public abstract class AbstractImageHeapLayouter<T extends AbstractImageHeapLayouter.AbstractImageHeapPartition> extends Object implements ImageHeapLayouter
| Modifier and Type | Class and Description |
|---|---|
static class |
AbstractImageHeapLayouter.AbstractImageHeapPartition
The native image heap comes in partitions.
|
| Constructor and Description |
|---|
AbstractImageHeapLayouter() |
| Modifier and Type | Method and Description |
|---|---|
void |
assignObjectToPartition(ImageHeapObject info,
boolean immutable,
boolean references,
boolean relocatable)
Assign an object to the most suitable partition.
|
protected ImageHeapLayoutInfo |
createLayoutInfo(long heapStartOffset,
long writableBeginOffset) |
protected abstract T |
createPartition(String name,
boolean containsReferences,
boolean writable,
boolean hugeObjects) |
protected abstract T[] |
createPartitionsArray(int count) |
protected abstract ImageHeapLayoutInfo |
doLayout(ImageHeap imageHeap) |
protected long |
getHugeObjectThreshold()
The size in bytes at and above which an object should be assigned to the huge partitions.
|
T[] |
getPartitions()
Returns all native image heap partitions.
|
protected T |
getReadOnlyHuge() |
protected T |
getReadOnlyPrimitive() |
protected T |
getReadOnlyReference() |
protected T |
getReadOnlyRelocatable() |
protected T |
getWritableHuge() |
protected T |
getWritablePrimitive() |
protected T |
getWritableReference() |
ImageHeapLayoutInfo |
layout(ImageHeap imageHeap,
int pageSize)
This method places all heap partitions as one contiguous memory block in one section.
|
void |
writeMetadata(ByteBuffer imageHeapBytes,
long imageHeapOffsetInBuffer)
Based on the layout decided during an earlier call to
ImageHeapLayouter.layout(com.oracle.svm.core.image.ImageHeap, int), fill the image heap in
the supplied buffer with additional data structures, if any. |
public T[] getPartitions()
ImageHeapLayoutergetPartitions in interface ImageHeapLayouterpublic void assignObjectToPartition(ImageHeapObject info, boolean immutable, boolean references, boolean relocatable)
ImageHeapLayouterassignObjectToPartition in interface ImageHeapLayouterpublic ImageHeapLayoutInfo layout(ImageHeap imageHeap, int pageSize)
ImageHeapLayouterlayout in interface ImageHeapLayouterpublic void writeMetadata(ByteBuffer imageHeapBytes, long imageHeapOffsetInBuffer)
ImageHeapLayouterImageHeapLayouter.layout(com.oracle.svm.core.image.ImageHeap, int), fill the image heap in
the supplied buffer with additional data structures, if any. At this time, the buffer already
contains the laid out objects, which are not meant to be modified in this step.writeMetadata in interface ImageHeapLayouterimageHeapOffsetInBuffer - The offset of the first byte of the laid out image heap in the
buffer. If a layouter subclass can be instructed to start laying out the image
heap at a specific non-zero offset, and the image heap is intended to start at the
same offset in the given buffer, the same offset must be specified to this method.protected abstract ImageHeapLayoutInfo doLayout(ImageHeap imageHeap)
protected T getReadOnlyPrimitive()
protected T getReadOnlyReference()
protected T getReadOnlyRelocatable()
protected T getWritablePrimitive()
protected T getWritableReference()
protected T getWritableHuge()
protected T getReadOnlyHuge()
protected long getHugeObjectThreshold()
protected ImageHeapLayoutInfo createLayoutInfo(long heapStartOffset, long writableBeginOffset)
protected abstract T[] createPartitionsArray(int count)