public interface CommittedMemoryProvider
| Modifier and Type | Field and Description |
|---|---|
static org.graalvm.word.UnsignedWord |
UNALIGNED
Value for alignment parameters that indicates that no specific alignment is required (other
than the granularity usually).
|
| Modifier and Type | Method and Description |
|---|---|
default void |
afterGarbageCollection(boolean completeCollection)
Called by the garbage collector after a collection has ended, as an opportunity to perform
lazy operations, sanity checks or clean-ups.
|
org.graalvm.word.Pointer |
allocate(org.graalvm.word.UnsignedWord nbytes,
org.graalvm.word.UnsignedWord alignment,
boolean executable)
Allocate a block of committed memory.
|
default void |
beforeGarbageCollection()
Called by the garbage collector before a collection is started, as an opportunity to perform
lazy operations, sanity checks or clean-ups.
|
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). |
static CommittedMemoryProvider |
get() |
default org.graalvm.word.UnsignedWord |
getGranularity()
Returns the granularity of committed memory management, which is typically the same as that
of virtual memory management.
|
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.
|
static final org.graalvm.word.UnsignedWord UNALIGNED
static CommittedMemoryProvider get()
int initialize(org.graalvm.nativeimage.c.type.WordPointer isolatePointer,
CEntryPointCreateIsolateParameters parameters)
int tearDown()
default org.graalvm.word.UnsignedWord getGranularity()
org.graalvm.word.Pointer allocate(org.graalvm.word.UnsignedWord nbytes,
org.graalvm.word.UnsignedWord alignment,
boolean executable)
nbytes - 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.boolean free(org.graalvm.word.PointerBase start,
org.graalvm.word.UnsignedWord nbytes,
org.graalvm.word.UnsignedWord alignment,
boolean executable)
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.default void beforeGarbageCollection()
default void afterGarbageCollection(boolean completeCollection)
completeCollection - Whether the garbage collector has performed a full collection.