public class OSCommittedMemoryProvider extends Object implements CommittedMemoryProvider
Modifier and Type | Class and Description |
---|---|
protected static class |
OSCommittedMemoryProvider.VirtualMemoryTracker |
UNALIGNED
Constructor and Description |
---|
OSCommittedMemoryProvider() |
Modifier and Type | Method and Description |
---|---|
org.graalvm.word.Pointer |
allocate(org.graalvm.word.UnsignedWord size,
org.graalvm.word.UnsignedWord alignment,
boolean executable)
Allocate the requested amount of virtual memory at the requested alignment.
|
boolean |
free(org.graalvm.word.PointerBase start,
org.graalvm.word.UnsignedWord nbytes,
org.graalvm.word.UnsignedWord alignment,
boolean executable)
Release a block of committed memory that was allocated with
CommittedMemoryProvider.allocate(org.graalvm.word.UnsignedWord, org.graalvm.word.UnsignedWord, boolean) , requiring the
exact same parameter values that were originally passed to CommittedMemoryProvider.allocate(org.graalvm.word.UnsignedWord, org.graalvm.word.UnsignedWord, boolean) . |
int |
initialize(org.graalvm.nativeimage.c.type.WordPointer isolatePointer,
CEntryPointCreateIsolateParameters parameters)
Performs initializations for the current isolate, before any other methods of this
interface may be called.
|
int |
tearDown()
Tear down for the current isolate.
|
protected static void |
tearDownVirtualMemoryConsumers() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
afterGarbageCollection, beforeGarbageCollection, get, getGranularity, tearDownUnmanagedMemoryConsumers
public int initialize(org.graalvm.nativeimage.c.type.WordPointer isolatePointer, CEntryPointCreateIsolateParameters parameters)
CommittedMemoryProvider
initialize
in interface CommittedMemoryProvider
protected static void tearDownVirtualMemoryConsumers()
public int tearDown()
CommittedMemoryProvider
tearDown
in interface CommittedMemoryProvider
public org.graalvm.word.Pointer allocate(org.graalvm.word.UnsignedWord size, org.graalvm.word.UnsignedWord alignment, boolean executable)
allocate
in interface CommittedMemoryProvider
size
- The number of bytes to allocate, which is rounded up to the next multiple of
the granularity if required.alignment
- The required alignment of the block start, which should be a multiple of the
granularity, or CommittedMemoryProvider.UNALIGNED
.executable
- Whether the block must be executable.public boolean free(org.graalvm.word.PointerBase start, org.graalvm.word.UnsignedWord nbytes, org.graalvm.word.UnsignedWord alignment, boolean executable)
CommittedMemoryProvider
CommittedMemoryProvider.allocate(org.graalvm.word.UnsignedWord, org.graalvm.word.UnsignedWord, boolean)
, requiring the
exact same parameter values that were originally passed to CommittedMemoryProvider.allocate(org.graalvm.word.UnsignedWord, org.graalvm.word.UnsignedWord, boolean)
.free
in interface CommittedMemoryProvider
start
- The start of the memory block, as returned by CommittedMemoryProvider.allocate(org.graalvm.word.UnsignedWord, org.graalvm.word.UnsignedWord, boolean)
.nbytes
- The originally requested size in bytes.alignment
- The originally requested alignment.executable
- Whether the block was requested to be executable.