|
|||||||||||
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.ImmortalSpace
public final class ImmortalSpace
This class implements tracing for a simple immortal collection policy. Under this policy all that is required is for the "collector" to propagate marks in a liveness trace. It does not actually collect. This class does not hold any state, all methods are static.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class org.mmtk.policy.Space |
---|
Space.SpaceVisitor |
Field Summary | |
---|---|
(package private) static byte |
GC_MARK_BIT_MASK
|
private byte |
markState
|
private static int |
META_DATA_PAGES_PER_REGION
|
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 | |
---|---|
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. |
Method Summary | |
---|---|
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 Returns true if marking was done. |
ObjectReference |
traceObject(TransitiveClosure trace,
ObjectReference object)
Trace a reference to an object under an immortal collection policy. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
static final byte GC_MARK_BIT_MASK
private static final int META_DATA_PAGES_PER_REGION
private byte markState
Constructor Detail |
---|
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.Method Detail |
---|
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)
true
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)
release
in class Space
start
- The address of the start of the page or pagespublic boolean isLive(ObjectReference object)
Space
isLive
in class Space
object
- The object reference.
true
if the object is live.public boolean isReachable(ObjectReference object)
isReachable
in class Space
object
- The address of an object in immortal space to test
true
if ref
may be a reachable object (e.g., having
the current mark state). While all immortal objects are live,
some may be unreachable.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |