public final class ImmortalSpace extends Space
Space.SpaceVisitor
Modifier and Type | Field and Description |
---|---|
(package private) static byte |
GC_MARK_BIT_MASK |
private byte |
markState |
private static int |
META_DATA_PAGES_PER_REGION |
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 |
---|
ImmortalSpace(String name,
boolean zeroed,
VMRequest vmRequest)
The caller specifies the region of virtual memory to be used for
this space.
|
ImmortalSpace(String name,
VMRequest vmRequest)
The caller specifies the region of virtual memory to be used for
this space.
|
Modifier and Type | Method and Description |
---|---|
Word |
getMarkState() |
void |
initializeHeader(ObjectReference object)
Initialize the object header post-allocation.
|
boolean |
isLive(ObjectReference object)
Is the object in this space alive?
|
boolean |
isReachable(ObjectReference object)
Returns if the object in question is currently thought to be reachable.
|
void |
prepare()
Prepare for a new collection increment.
|
void |
release() |
void |
release(Address start)
Release an allocated page or pages.
|
private static boolean |
testAndMark(ObjectReference object,
byte value)
Used to mark boot image objects during a parallel scan of objects during GC.
|
ObjectReference |
traceObject(TransitiveClosure trace,
ObjectReference object)
Trace a reference to an object under an immortal collection
policy.
|
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, printUsageMB, printUsagePages, printVMMap, releaseAllChunks, releaseDiscontiguousChunks, requiredChunks, reservedPages, setZeroingApproach, skipConcurrentZeroing, triggerConcurrentZeroing, visitSpaces
static final byte GC_MARK_BIT_MASK
private static final int META_DATA_PAGES_PER_REGION
private byte markState
public ImmortalSpace(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 ImmortalSpace(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 Word getMarkState()
public void initializeHeader(ObjectReference object)
object
- The newly allocated object instance whose header we are initializingprivate static boolean testAndMark(ObjectReference object, byte value)
object
- the object to markvalue
- the mark valuetrue
if marking was done.public ObjectReference traceObject(TransitiveClosure trace, ObjectReference object)
traceObject
in class Space
trace
- The trace being conducted.object
- The object to be traced.public void prepare()
public void release()
public void release(Address start)
public boolean isLive(ObjectReference object)
Space
public boolean isReachable(ObjectReference object)
isReachable
in class Space
object
- The address of an object in immortal space to testtrue
if ref
may be a reachable object (e.g., having
the current mark state). While all immortal objects are live,
some may be unreachable.