Package owl.cinterface
Class UnmanagedMemory
- java.lang.Object
-
- owl.cinterface.UnmanagedMemory
-
public final class UnmanagedMemory extends Object
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidfree(org.graalvm.word.PointerBase ptr)Frees unmanaged memory that was previously allocated using methods of this class.static org.graalvm.nativeimage.c.type.CDoublePointermallocCDoublePointer(long size)Allocates an double array ofsizein the unmanaged memory.static org.graalvm.nativeimage.c.type.CIntPointermallocCIntPointer(long size)Allocates an int array ofsizein the unmanaged memory.static org.graalvm.nativeimage.c.type.CDoublePointerreallocCDoublePointer(org.graalvm.nativeimage.c.type.CDoublePointer ptr, long size)Changes the size of the provided double array in the unmanaged memory tosize.static org.graalvm.nativeimage.c.type.CIntPointerreallocCIntPointer(org.graalvm.nativeimage.c.type.CIntPointer ptr, long size)Changes the size of the provided int array in the unmanaged memory tosize.
-
-
-
Method Detail
-
mallocCIntPointer
public static org.graalvm.nativeimage.c.type.CIntPointer mallocCIntPointer(long size)
Allocates an int array ofsizein the unmanaged memory. The content of the memory is undefined. Ifsizeis 0, the method returns the null pointer.This class wraps around GraalVM infrastructure in order to fix quirky behaviour and provide an emulation on other JVMs.
-
mallocCDoublePointer
public static org.graalvm.nativeimage.c.type.CDoublePointer mallocCDoublePointer(long size)
Allocates an double array ofsizein the unmanaged memory. The content of the memory is undefined. Ifsizeis 0, the method returns the null pointer.This class wraps around GraalVM infrastructure in order to fix quirky behaviour and provide an emulation on other JVMs.
-
reallocCIntPointer
public static org.graalvm.nativeimage.c.type.CIntPointer reallocCIntPointer(org.graalvm.nativeimage.c.type.CIntPointer ptr, long size)Changes the size of the provided int array in the unmanaged memory tosize. If the new size is larger than the old size, the content of the additional memory is undefined. Ifsizeis 0, the method returns the null pointer.This class wraps around GraalVM infrastructure in order to fix quirky behaviour and provide an emulation on other JVMs.
-
reallocCDoublePointer
public static org.graalvm.nativeimage.c.type.CDoublePointer reallocCDoublePointer(org.graalvm.nativeimage.c.type.CDoublePointer ptr, long size)Changes the size of the provided double array in the unmanaged memory tosize. If the new size is larger than the old size, the content of the additional memory is undefined. Ifsizeis 0, the method returns the null pointer.This class wraps around GraalVM infrastructure in order to fix quirky behaviour and provide an emulation on other JVMs.
-
free
public static void free(org.graalvm.word.PointerBase ptr)
Frees unmanaged memory that was previously allocated using methods of this class.This class wraps around GraalVM infrastructure in order to fix quirky behaviour and provide an emulation on other JVMs.
-
-