|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.mmtk.plan.MutatorContext org.mmtk.plan.SimpleMutator org.mmtk.plan.StopTheWorldMutator org.mmtk.plan.markcompact.MCMutator
public class MCMutator
This class implements per-mutator thread behavior and state for the MC plan, which implements a full-heap mark-compact collector.
Specifically, this class defines MC mutator-time allocation and per-mutator thread collection semantics (flushing and restoring per-mutator allocator state).
See MC
for an overview of the mark-compact algorithm.
MC
,
MCCollector
,
StopTheWorldMutator
,
MutatorContext
Field Summary | |
---|---|
private MarkCompactLocal |
mc
Instance fields |
Fields inherited from class org.mmtk.plan.MutatorContext |
---|
immortal, lgcode, log, los, nonmove, smcode |
Constructor Summary | |
---|---|
MCMutator()
Constructor |
Method Summary | |
---|---|
Address |
alloc(int bytes,
int align,
int offset,
int allocator,
int site)
Allocate memory for an object. |
void |
collectionPhase(short phaseId,
boolean primary)
Perform a per-mutator collection phase. |
void |
flush()
Flush the pages this mutator has allocated back to the global dirty page list, where the collectors can find them. |
Allocator |
getAllocatorFromSpace(Space space)
Return the allocator instance associated with a space space , for this plan instance. |
void |
postAlloc(ObjectReference ref,
ObjectReference typeRef,
int bytes,
int allocator)
Perform post-allocation actions. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private final MarkCompactLocal mc
Constructor Detail |
---|
public MCMutator()
Method Detail |
---|
public Address alloc(int bytes, int align, int offset, int allocator, int site)
This class handles the default allocator from the mark sweep space, and delegates everything else to the superclass.
alloc
in class MutatorContext
bytes
- The number of bytes required for the object.align
- Required alignment for the object.offset
- Offset associated with the alignment.allocator
- The allocator associated with this request.site
- Allocation site
public void postAlloc(ObjectReference ref, ObjectReference typeRef, int bytes, int allocator)
Initialize the object header for objects in the mark-sweep space, and delegate to the superclass for other objects.
postAlloc
in class MutatorContext
ref
- The newly allocated objecttypeRef
- the type reference for the instance being createdbytes
- The size of the space to be allocated (in bytes)allocator
- The allocator number to be used for this allocationpublic Allocator getAllocatorFromSpace(Space space)
MutatorContext
space
, for this plan instance.
getAllocatorFromSpace
in class MutatorContext
space
- The space for which the allocator instance is desired.
space
, or null
if no appropriate allocator can be established.public final void collectionPhase(short phaseId, boolean primary)
collectionPhase
in class SimpleMutator
phaseId
- The unique phase identifierprimary
- Should this thread be used to execute any single-threaded
local operations?public void flush()
flush
in class MutatorContext
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |