public class OSCommittedMemoryProvider extends AbstractCommittedMemoryProvider
Modifier and Type | Class and Description |
---|---|
protected static class |
OSCommittedMemoryProvider.VirtualMemoryTracker |
CommittedMemoryProvider.Access
UNALIGNED
Constructor and Description |
---|
OSCommittedMemoryProvider() |
Modifier and Type | Method and Description |
---|---|
protected org.graalvm.word.Pointer |
allocate(org.graalvm.word.UnsignedWord size,
boolean executable)
Allocate the requested amount of virtual memory at the default alignment.
|
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.
|
protected static org.graalvm.word.UnsignedWord |
defaultAlignment()
Returns the default alignment used by committed memory management, which is usually the same
as that used by virtual memory management.
|
protected static int |
defaultProtection(boolean executable) |
protected boolean |
free(org.graalvm.word.PointerBase start,
org.graalvm.word.UnsignedWord size) |
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.
|
protect
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
afterGarbageCollection, beforeGarbageCollection, get, getGranularity
protected static org.graalvm.word.UnsignedWord defaultAlignment()
public int initialize(org.graalvm.nativeimage.c.type.WordPointer isolatePointer, CEntryPointCreateIsolateParameters parameters)
CommittedMemoryProvider
public int tearDown()
CommittedMemoryProvider
public org.graalvm.word.Pointer allocate(org.graalvm.word.UnsignedWord size, org.graalvm.word.UnsignedWord alignment, boolean executable)
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, or CommittedMemoryProvider.UNALIGNED
.executable
- Whether the block must be executable.protected final org.graalvm.word.Pointer allocate(org.graalvm.word.UnsignedWord size, boolean executable)
protected static int defaultProtection(boolean 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)
.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.protected final boolean free(org.graalvm.word.PointerBase start, org.graalvm.word.UnsignedWord size)