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 |
---|---|
org.graalvm.word.Pointer |
allocate(org.graalvm.word.UnsignedWord size,
org.graalvm.word.UnsignedWord alignment,
boolean executable)
Allocate a block of committed memory.
|
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.
|
guaranteesHeapPreferredAddressSpaceAlignment, protect, protectSingleIsolateImageHeap
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
afterGarbageCollection, beforeGarbageCollection, get, getGranularity
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)
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, or CommittedMemoryProvider.UNALIGNED
.executable
- Whether the block must be executable.WordFactory.nullPointer()
in case of an
error.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.