public final class LargeObjectSpace extends BaseLargeObjectSpace
Space.SpaceVisitor
Modifier and Type | Field and Description |
---|---|
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 |
PAGE_MASK
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 and Description |
---|
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.
|
Modifier and Type | Method and Description |
---|---|
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)
Prepares 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)
Sweeps 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.
|
free, getHeaderSize, getSize, getSuperPage
acquire, availablePhysicalPages, chunkAlign, chunkAlign, committedPages, cumulativeCommittedPages, eagerlyMmapMMTkContiguousSpaces, eagerlyMmapMMTkDiscontiguousSpaces, eagerlyMmapMMTkSpaces, getDescriptor, getDiscontigEnd, getDiscontigStart, getExtent, getFracAvailable, getHeadDiscontiguousRegion, getIndex, getName, getSpaceCount, getSpaceForAddress, getSpaceForObject, getSpaces, getStart, growDiscontiguousSpace, growSpace, isImmortal, isImmortal, isInSpace, isInSpace, isMappedAddress, isMappedObject, isMovable, isMovable, isReachable, printUsageMB, printUsagePages, printVMMap, releaseAllChunks, releaseDiscontiguousChunks, requiredChunks, reservedPages, setZeroingApproach, skipConcurrentZeroing, triggerConcurrentZeroing, visitSpaces
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
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.public void prepare(boolean fullHeap)
fullHeap
- whether the collection will be full heappublic void release(boolean fullHeap)
fullHeap
- whether the collection was full heapprivate void sweepLargePages(boolean sweepNursery)
sweepNursery
- whether to sweep the nurserypublic void release(Address first)
Space
public 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
private void internalMarkObject(ObjectReference object, boolean nurseryObject)
object
- The object which has been marked.nurseryObject
- whether the object is in the nurserypublic 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)
object
- The object whose mark bit is to be writtenvalue
- The value to which the mark bit will be settrue
if successful, false
if the
mark bit was already set.private 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 testedtrue
if the mark bit for the object has the given value.private boolean isInNursery(ObjectReference object)
true
if the object is in the logical nurseryobject
- The object whose status is to be testedtrue
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()