public class NativeMemoryManager extends java.lang.Object implements MemoryManager
Modifier and Type | Field and Description |
---|---|
private long |
addressMask |
private Runtime |
runtime |
Constructor and Description |
---|
NativeMemoryManager(NativeRuntime runtime) |
Modifier and Type | Method and Description |
---|---|
Pointer |
allocate(int size) |
Pointer |
allocateDirect(int size) |
Pointer |
allocateDirect(int size,
boolean clear) |
Pointer |
allocateTemporary(int size) |
Pointer |
allocateTemporary(int size,
boolean clear) |
Pointer |
newOpaquePointer(long address) |
Pointer |
newPointer(java.nio.ByteBuffer buffer) |
Pointer |
newPointer(long address) |
Pointer |
newPointer(long address,
long size) |
private final Runtime runtime
private final long addressMask
public NativeMemoryManager(NativeRuntime runtime)
public Pointer allocate(int size)
allocate
in interface MemoryManager
public Pointer allocateDirect(int size)
allocateDirect
in interface MemoryManager
public Pointer allocateDirect(int size, boolean clear)
allocateDirect
in interface MemoryManager
public Pointer allocateTemporary(int size)
public Pointer allocateTemporary(int size, boolean clear)
allocateTemporary
in interface MemoryManager
public Pointer newPointer(java.nio.ByteBuffer buffer)
newPointer
in interface MemoryManager
public Pointer newPointer(long address)
newPointer
in interface MemoryManager
public Pointer newPointer(long address, long size)
newPointer
in interface MemoryManager
public Pointer newOpaquePointer(long address)
newOpaquePointer
in interface MemoryManager