|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.mmtk.plan.Plan org.mmtk.plan.Simple org.mmtk.plan.StopTheWorld org.mmtk.plan.semispace.SS
public class SS
This class implements a simple semi-space collector. See the Jones & Lins GC book, section 2.2 for an overview of the basic algorithm. This implementation also includes a large object space (LOS), and an uncollected "immortal" space.
All plans make a clear distinction between global and thread-local activities. Global activities must be synchronized, whereas no synchronization is required for thread-local activities. Instances of Plan map 1:1 to "kernel threads" (aka CPUs). Thus instance methods allow fast, unsychronized access to Plan utilities such as allocation and collection. Each instance rests on static resources (such as memory and virtual memory resources) which are "global" and therefore "static" members of Plan. This mapping of threads to instances is crucial to understanding the correctness and performance properties of this plan.
Field Summary | |
---|---|
static int |
ALLOC_SS
|
static CopySpace |
copySpace0
One of the two semi spaces that alternate roles at each collection |
static CopySpace |
copySpace1
One of the two semi spaces that alternate roles at each collection |
static boolean |
hi
true if allocating into the "higher" semispace |
static int |
SCAN_SS
|
static int |
SS0
|
static int |
SS1
|
Trace |
ssTrace
|
Fields inherited from class org.mmtk.plan.StopTheWorld |
---|
postSanityPhase, preSanityPhase |
Constructor Summary | |
---|---|
SS()
Constructor |
Method Summary | |
---|---|
void |
collectionPhase(short phaseId)
Perform a (global) collection phase. |
static CopySpace |
fromSpace()
|
int |
getCollectionReserve()
Return the number of pages reserved for copying. |
int |
getPagesAvail()
Return the number of pages available for allocation, assuming all future allocation is to the semi-space. |
int |
getPagesUsed()
Return the number of pages reserved for use given the pending allocation. |
protected void |
registerSpecializedMethods()
Register specialized methods. |
static CopySpace |
toSpace()
|
boolean |
willNeverMove(ObjectReference object)
Can this object ever move. |
Methods inherited from class org.mmtk.plan.StopTheWorld |
---|
processOptions |
Methods inherited from class org.mmtk.plan.Simple |
---|
replacePhase, replacePlaceholderPhase, switchNurseryZeroingApproach |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static boolean hi
true
if allocating into the "higher" semispace
public static final CopySpace copySpace0
public static final int SS0
public static final CopySpace copySpace1
public static final int SS1
public final Trace ssTrace
public static final int ALLOC_SS
public static final int SCAN_SS
Constructor Detail |
---|
public SS()
Method Detail |
---|
public static CopySpace toSpace()
public static CopySpace fromSpace()
public void collectionPhase(short phaseId)
collectionPhase
in class Simple
phaseId
- The unique id of the phase to perform.public final int getCollectionReserve()
getCollectionReserve
in class Plan
public int getPagesUsed()
getPagesUsed
in class Plan
public final int getPagesAvail()
getPagesAvail
in class Plan
public boolean willNeverMove(ObjectReference object)
Plan
willNeverMove
in class Plan
object
- The object in question
true
if it is not possible that the object will ever move.protected void registerSpecializedMethods()
Plan
registerSpecializedMethods
in class Plan
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |