public interface ImageHeapProvider
When a heap base is used, then the image heap is always mapped in a way that the memory at the
heap base is protected and marked as inaccessible. Depending on the specific scenario, that
memory may or may not be part of the Native Image file (see
Heap.getImageHeapNullRegionSize() and Heap.getImageHeapOffsetInAddressSpace() for
more details). This is done regardless of the used GC, platform, or CPU architecture:
| protected memory | image heap | ^ heapBase
| Modifier and Type | Method and Description |
|---|---|
int |
freeImageHeap(org.graalvm.word.PointerBase heapBase)
Disposes an instance of the image heap that was created with this provider.
|
static ImageHeapProvider |
get() |
boolean |
guaranteesHeapPreferredAddressSpaceAlignment()
Returns whether this provider, when not already supplied a reserved address space by
CommittedMemoryProvider, will always ensure a heap address space alignment of
Heap.getPreferredAddressSpaceAlignment() at image runtime. |
int |
initialize(org.graalvm.word.Pointer reservedAddressSpace,
org.graalvm.word.UnsignedWord reservedSize,
org.graalvm.nativeimage.c.type.WordPointer basePointer,
org.graalvm.nativeimage.c.type.WordPointer endPointer)
Creates a new instance of the image heap.
|
static ImageHeapProvider get()
boolean guaranteesHeapPreferredAddressSpaceAlignment()
CommittedMemoryProvider, will always ensure a heap address space alignment of
Heap.getPreferredAddressSpaceAlignment() at image runtime.int initialize(org.graalvm.word.Pointer reservedAddressSpace,
org.graalvm.word.UnsignedWord reservedSize,
org.graalvm.nativeimage.c.type.WordPointer basePointer,
org.graalvm.nativeimage.c.type.WordPointer endPointer)
reservedAddressSpace - If non-null, this specifies the address of a contiguous block of
memory in which the image heap and the Java heap should be placed. If null, the
ImageHeapProvider is responsible for allocating sufficient memory for the
image heap at an arbitrary address.reservedSize - If reservedAddressSpace is non-null, the number of reserved bytes
at that address.basePointer - An address where a pointer to the start address of the image heap instance
will be written. Must not be null.endPointer - An address where a pointer to the end of the image heap instance will be
written. May be null if this value is not required.CEntryPointErrors.int freeImageHeap(org.graalvm.word.PointerBase heapBase)
ImageHeapProvider.