|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.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
|
private static byte |
LOS_BIT_MASK
|
private static byte |
MARK_BIT
|
private byte |
markState
|
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, zeroed |
Constructor Summary | |
---|---|
LargeObjectSpace(String name,
boolean zeroed,
VMRequest vmRequest)
The caller specifies the region of virtual memory to be used for this space. |
|
LargeObjectSpace(String name,
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 unit of allocation (a page or pages) |
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, VMRequest vmRequest)
name
- The name of this space (used when printing error messages etc)vmRequest
- An object describing the virtual memory requested.public LargeObjectSpace(String name, boolean zeroed, VMRequest vmRequest)
name
- The name of this space (used when printing error messages etc)zeroed
- if true, allocations return zeroed memory.vmRequest
- 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)
Space
release
in class Space
first
- The address of the start of the region to be releasedpublic ObjectReference traceObject(TransitiveClosure trace, ObjectReference object)
traceObject
in class Space
trace
- The trace being conducted.object
- The object to be traced.
public boolean isLive(ObjectReference object)
Space
isLive
in class Space
object
- The object in question
true
if this object is known to be live (i.e. it is marked)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 occurring due to (initial) allocation
(true
) or due to copying (false
)?private boolean testAndMark(ObjectReference object, byte value)
true
if successful, false
if the mark bit was already set.
object
- The object whose mark bit is to be writtenvalue
- The value to which the mark bit will be setprivate boolean testMarkBit(ObjectReference object, byte value)
true
if the mark bit for an object has the given value.
object
- The object whose mark bit is to be testedvalue
- The value against which the mark bit will be tested
true
if the mark bit for the object has the given value.private boolean isInNursery(ObjectReference object)
true
if the object is in the logical nursery
object
- The object whose status is to be tested
true
if the object is in the logical nurseryprotected int superPageHeaderSize()
BaseLargeObjectSpace
superPageHeaderSize
in class BaseLargeObjectSpace
protected int cellHeaderSize()
BaseLargeObjectSpace
cellHeaderSize
in class BaseLargeObjectSpace
public Treadmill getTreadmill()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |