|
|||||||||||
| 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.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 propogate 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
Class variables |
private byte |
markState
Instance variables |
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 |
| Constructor Summary | |
|---|---|
ImmortalSpace(String name,
int pageBudget,
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,
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 Word getMarkState()
public void initializeHeader(ObjectReference object)
object - The newly allocated object instance whose header we are initializing
private static boolean testAndMark(ObjectReference object,
byte value)
public ObjectReference traceObject(TransitiveClosure trace,
ObjectReference object)
traceObject in class Spacetrace - The trace being conducted.object - The object to be traced.
public void prepare()
public void release()
public void release(Address start)
release in class Spacestart - The address of the start of the page or pagespublic boolean isLive(ObjectReference object)
Space
isLive in class Spaceobject - The object reference.
public boolean isReachable(ObjectReference object)
isReachable in class Spaceobject - The address of an object in immortal space to test
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 | ||||||||||