|
|||||||||||
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.generational.Gen org.mmtk.plan.generational.marksweep.GenMS
public class GenMS
This class implements the functionality of a two-generation copying
collector where the higher generation is a mark-sweep space
(free list allocation, mark-sweep collection). Nursery collections
occur when either the heap is full or the nursery is full. The
nursery size is determined by an optional command line argument.
If undefined, the nursery size is "infinite", so nursery
collections only occur when the heap is full (this is known as a
flexible-sized nursery collector). Thus both fixed and flexible
nursery sizes are supported. Full heap collections occur when the
nursery size has dropped to a statically defined threshold,
NURSERY_THRESHOLD
See the Jones & Lins GC book, chapter 7 for a detailed discussion of generational collection and section 7.3 for an overview of the flexible nursery behavior ("The Standard ML of New Jersey collector"), or go to Appel's paper "Simple generational garbage collection and fast allocation." SP&E 19(2):171--183, 1989.
For general comments about the global/local distinction among classes refer to Plan.java and PlanLocal.java.
Field Summary | |
---|---|
Trace |
matureTrace
The trace class for a full-heap collection |
static int |
MS
|
static MarkSweepSpace |
msSpace
The mature space, which for GenMS uses a mark sweep collection policy. |
Fields inherited from class org.mmtk.plan.StopTheWorld |
---|
postSanityPhase, preSanityPhase |
Constructor Summary | |
---|---|
GenMS()
|
Method Summary | |
---|---|
protected Space |
activeMatureSpace()
Accessor method to allow the generic generational code in Gen.java to access the mature space. |
void |
collectionPhase(short phaseId)
Perform a (global) collection phase. |
int |
getMaturePhysicalPagesAvail()
Return the number of pages available for allocation into the mature space. |
int |
getPagesUsed()
Return the number of pages reserved for use given the pending allocation. |
protected void |
registerSpecializedMethods()
Register specialized methods. |
boolean |
willNeverMove(ObjectReference object)
Can this object ever move. |
Methods inherited from class org.mmtk.plan.generational.Gen |
---|
collectionRequired, copyMature, forceFullHeapCollection, fullyBooted, getCollectionReserve, getPagesAvail, isCurrentGCNursery, lastCollectionFullHeap, printPreStats, requiresFullHeapCollection, sanityExpectedRC, traceFullHeap |
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 final MarkSweepSpace msSpace
public static final int MS
public final Trace matureTrace
Constructor Detail |
---|
public GenMS()
Method Detail |
---|
public final void collectionPhase(short phaseId)
collectionPhase
in class Gen
phaseId
- The unique id of the phase to perform.public int getPagesUsed()
getPagesUsed
in class Gen
public int getMaturePhysicalPagesAvail()
Gen
getMaturePhysicalPagesAvail
in class Gen
protected final Space activeMatureSpace()
activeMatureSpace
in class Gen
Gen
.public boolean willNeverMove(ObjectReference object)
Plan
willNeverMove
in class Gen
object
- The object in question
true
if it is not possible that the object will ever move.protected void registerSpecializedMethods()
Plan
registerSpecializedMethods
in class Gen
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |