|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.mmtk.policy.Space
org.mmtk.policy.BaseLargeObjectSpace
org.mmtk.policy.LargeObjectSpace
public final class LargeObjectSpace
Each instance of this class corresponds to one explicitly managed large object space.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class org.mmtk.policy.Space |
|---|
Space.SpaceVisitor |
| Field Summary | |
|---|---|
static int |
GLOBAL_GC_BITS_REQUIRED
|
private boolean |
inNurseryGC
|
static int |
LOCAL_GC_BITS_REQUIRED
Class variables |
private static byte |
LOS_BIT_MASK
|
private static byte |
MARK_BIT
|
private byte |
markState
Instance variables |
private static byte |
NURSERY_BIT
|
private Treadmill |
treadmill
|
| Fields inherited from class org.mmtk.policy.BaseLargeObjectSpace |
|---|
PAGE_MASK |
| Fields inherited from class org.mmtk.policy.Space |
|---|
AVAILABLE_BYTES, AVAILABLE_END, AVAILABLE_PAGES, AVAILABLE_START, BYTES_IN_CHUNK, contiguous, descriptor, extent, headDiscontiguousRegion, HEAP_END, HEAP_START, immortal, LOG_ADDRESS_SPACE, LOG_BYTES_IN_CHUNK, MAX_CHUNKS, MAX_SPACES, movable, PAGES_IN_CHUNK, pr, start |
| Constructor Summary | |
|---|---|
LargeObjectSpace(String name,
int pageBudget,
VMRequest vmRequest)
The caller specifies the region of virtual memory to be used for this space. |
|
| Method Summary | |
|---|---|
protected int |
cellHeaderSize()
Return the size of the per-cell header for cells of a given class size. |
Treadmill |
getTreadmill()
This is the treadmill used by the large object space. |
void |
initializeHeader(ObjectReference object,
boolean alloc)
Perform any required initialization of the GC portion of the header. |
private void |
internalMarkObject(ObjectReference object,
boolean nurseryObject)
An object has been marked (identifiged as live). |
private boolean |
isInNursery(ObjectReference object)
Return true if the object is in the logical nursery |
boolean |
isLive(ObjectReference object)
Is the object in this space alive? |
void |
prepare(boolean fullHeap)
Prepare for a new collection increment. |
void |
release(Address first)
Release a group of pages that were allocated together. |
void |
release(boolean fullHeap)
A new collection increment has completed. |
protected int |
superPageHeaderSize()
Return the size of the per-superpage header required by this system. |
private void |
sweepLargePages(boolean sweepNursery)
Sweep through the large pages, releasing all superpages on the "from space" treadmill. |
private boolean |
testAndMark(ObjectReference object,
byte value)
Atomically attempt to set the mark bit of an object. |
private boolean |
testMarkBit(ObjectReference object,
byte value)
Return true if the mark bit for an object has the given value. |
ObjectReference |
traceObject(TransitiveClosure trace,
ObjectReference object)
Trace a reference to an object under a mark sweep collection policy. |
| Methods inherited from class org.mmtk.policy.BaseLargeObjectSpace |
|---|
free, getHeaderSize, getSize, getSuperPage |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int LOCAL_GC_BITS_REQUIRED
public static final int GLOBAL_GC_BITS_REQUIRED
private static final byte MARK_BIT
private static final byte NURSERY_BIT
private static final byte LOS_BIT_MASK
private byte markState
private boolean inNurseryGC
private final Treadmill treadmill
| Constructor Detail |
|---|
public LargeObjectSpace(String name,
int pageBudget,
VMRequest vmRequest)
name - The name of this space (used when printing error messages etc)pageBudget - The number of pages this space may consume
before consulting the planvmRequest - An object describing the virtual memory requested.| Method Detail |
|---|
public void prepare(boolean fullHeap)
public void release(boolean fullHeap)
private void sweepLargePages(boolean sweepNursery)
public void release(Address first)
release in class Spacefirst - The first page in the group of pages that were
allocated together.
public ObjectReference traceObject(TransitiveClosure trace,
ObjectReference object)
traceObject in class Spacetrace - The trace being conducted.object - The object to be traced.
public boolean isLive(ObjectReference object)
Space
isLive in class Spaceobject - The object in question
private void internalMarkObject(ObjectReference object,
boolean nurseryObject)
object - The object which has been marked.
public void initializeHeader(ObjectReference object,
boolean alloc)
object - the object ref to the storage to be initializedalloc - is this initialization occuring due to (initial) allocation
(true) or due to copying (false)?
private boolean testAndMark(ObjectReference object,
byte value)
object - The object whose mark bit is to be writtenvalue - The value to which the mark bit will be set
private boolean testMarkBit(ObjectReference object,
byte value)
object - The object whose mark bit is to be testedvalue - The value against which the mark bit will be tested
private boolean isInNursery(ObjectReference object)
object - The object whose status is to be tested
protected int superPageHeaderSize()
superPageHeaderSize in class BaseLargeObjectSpaceprotected int cellHeaderSize()
cellHeaderSize in class BaseLargeObjectSpacepublic Treadmill getTreadmill()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||