public final class AlignedHeapChunk extends Object
This is the key to the chunk-allocated heap: Because these chunks are allocated on aligned boundaries, I can map from a Pointer to (or into) an Object to the AlignedChunk that contains it. From there I can get to the meta-data the AlignedChunk contains, without a table lookup on the Pointer.
Most allocation within a AlignedHeapChunk is via fast-path allocation snippets, but a slow-path allocation method is available.
Objects in a AlignedHeapChunk have to be promoted by copying from their current HeapChunk to a destination HeapChunk.
An AlignedHeapChunk is laid out:
+===============+-------+--------+----------------------+ | AlignedHeader | Card | First | Object ... | | Fields | Table | Object | | | | | Table | | +===============+-------+--------+----------------------+The CardTable and the FirstObjectTable and the start of the Objects are just computed addresses. The two tables each need the same fraction of the size of the space for Objects. I conservatively compute them as a fraction of the size of the entire chunk.
Modifier and Type | Class and Description |
---|---|
static interface |
AlignedHeapChunk.AlignedHeader
Additional fields beyond what is in
HeapChunk.Header . |
static class |
AlignedHeapChunk.TestingBackDoor |
Modifier and Type | Method and Description |
---|---|
static void |
dirtyCardForObject(Object object,
boolean verifyOnly)
Dirty the card corresponding to the given Object.
|
public static void dirtyCardForObject(Object object, boolean verifyOnly)