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 |
createDefaultLayoutInfo() |
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)
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()
ImageHeapLayouter
getPartitions
in interface ImageHeapLayouter
public void assignObjectToPartition(ImageHeapObject info, boolean immutable, boolean references, boolean relocatable)
ImageHeapLayouter
assignObjectToPartition
in interface ImageHeapLayouter
public ImageHeapLayoutInfo layout(ImageHeap imageHeap, int pageSize)
ImageHeapLayouter
layout
in interface ImageHeapLayouter
public void writeMetadata(ByteBuffer imageHeapBytes)
ImageHeapLayouter
ImageHeapLayouter.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 ImageHeapLayouter
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 createDefaultLayoutInfo()
protected abstract T[] createPartitionsArray(int count)