4 ms·
> There are no instructions for telling the JVM how to manually fiddle with raw memory. Ahem, sun.misc.Unsafe.{get,put}{Byte,Short,Int,Long,Float,Double,Addres
by cesarb 3y ago
> There are no instructions for telling the JVM how to manually fiddle with raw memory.
Ahem, sun.misc.Unsafe.{get,put}{Byte,Short,Int,Long,Float,Double,Address}
> What, for instance, do you turn a malloc() call for a number of bytes into?
Perhaps sun.misc.Unsafe.allocateMemory?
- w7 3y agoFrom what I understand jdk.internal.misc.Unsafe.* methods do not contain direct JVM opcodes for memory management, but virtual methods with implementation defined behavior, that usually require reflection to access, and are not 100% portable behavior wise between JVM implementations-- am I wrong?