![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
com.alexkasko.unsafe:unsafe-tools
Advanced tools
Tools to work with off-heap memory and byte arrays using sun.misc.Unsafe
Some tools to work with off-heap memory using sun.misc.Unsafe
class. Contains fallback
implementations for environments, where proper implementation of sun.misc.Unsafe
is not available.
All memory access code has boundary checks using assert keyword.
With assertions enabled in runtime (-ea
java switch) illegal memory access will throw AssertionError
.
Without assertions illegal memory access will crash JVM.
Library has no third-party dependencies and is available in Maven central:
<dependency>
<groupId>com.alexkasko.unsafe</groupId>
<artifactId>unsafe-tools</artifactId>
<version>1.4.4</version>
</dependency>
JVM allows to allocate and use memory outside of java heap. Such off-heap memory may be allocated/used/deallocated without additional load on garbage collector.
###Off-heap memory management
Off-heap memory manager implemented as a thin wrapper over sun.misc.Unsafe
. Other data structures implemented on top of it.
See com.alexkasko.unsafe.offheap
package description
for details.
###Off-heap collections of longs
Maximum array length in Java is bounded by Integer.MAX_VALUE
. This library provides long-sized fixed and growing arrays of longs.
See com.alexkasko.unsafe.offheaplong
package description
for details.
###Off-heap collections of structs (memory areas)
Equal-sized memory areas may be stored in off-heap memory contiguously as collections. Such memory areas also may be used
like C structs (without compiler checks, though). Sorting and searching of these collections may be done using long
or int
"fields" of such "structs" or using Comparator
. Sorting also can be performed "by-references" using additional array to
hold collections indices (without reordering elements in the collection itself).
See com.alexkasko.unsafe.offheapstruct
package description
for details.
###Operations
The following operations are implemented for all off-heap data structures:
sun.misc.Unsafe
may be used for writing/reading primitive values to/from byte arrays and to copying memory between byte arrays.
Byte array tool is implemented on top of it.
See com.alexkasko.unsafe.bytearray
package description
for details.
This project is released under the Apache License 2.0
1.4.4 (2014-09-22)
shrinkToFit
for struct array lists1.4.3 (2014-08-14)
1.4.2 (2014-07-08)
1.4.1 (2014-05-11)
1.4.0 (2013-12-27)
short
and byte
sort/search methods removed1.3.9 (2013-11-29)
1.3.8 (2013-11-05)
1.3.7 (2013-10-31)
1.3.6 (2013-10-25)
1.3.5 (2013-10-14)
1.3.4 (2013-09-16)
1.3.3 (2013-08-13)
1.3.2 (2013-08-08)
1.3.1 (2013-07-08)
short
and byte
fields1.3.0 (2013-07-07)
1.2.4 (2013-05-21)
set
setPayload
method added1.2.3 (2013-05-06)
assert
checks for off-heap memory1.2.2 (2013-04-28)
1.2.1 (2013-04-28)
1.2 (2013-04-25)
OffHeapPayloadSorter
- in some circumstances in 1.1 sorting may overwrite payload values
for equal headers. A lot of tests on random data have been run to check correctness of 1.2 version1.1 (2013-03-05)
1.0 (2013-02-24)
FAQs
Tools to work with off-heap memory and byte arrays using sun.misc.Unsafe
We found that com.alexkasko.unsafe:unsafe-tools demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.