|
|||||||||||
| 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.CopySpace
public final class CopySpace
This class implements tracing functionality for a simple copying space. Since no state needs to be held globally or locally, all methods are static.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class org.mmtk.policy.Space |
|---|
Space.SpaceVisitor |
| Field Summary | |
|---|---|
private boolean |
fromSpace
Instance variables |
static int |
GC_HEADER_WORDS_REQUIRED
|
static int |
GLOBAL_GC_BITS_REQUIRED
|
static int |
LOCAL_GC_BITS_REQUIRED
Class 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 | |
|---|---|
CopySpace(String name,
int pageBudget,
boolean fromSpace,
VMRequest vmRequest)
The caller specifies the region of virtual memory to be used for this space. |
|
| Method Summary | |
|---|---|
boolean |
isFromSpace()
|
boolean |
isLive(ObjectReference object)
Return true if this object is live in this GC |
boolean |
isMovable()
fromSpace CopySpace can always move, toSpace will not move during current GC |
boolean |
isReachable(ObjectReference object)
Has the object in this space been reached during the current collection. |
void |
postAlloc(ObjectReference object)
Perform any required post-allocation initialization Nothing to be done in this case |
void |
prepare(boolean fromSpace)
Prepare this space instance for a collection. |
void |
release()
Release this copy space after a collection. |
void |
release(Address start)
Release an allocated page or pages. |
ObjectReference |
traceObject(TransitiveClosure trace,
ObjectReference object)
Trace an object under a copying collection policy. |
ObjectReference |
traceObject(TransitiveClosure trace,
ObjectReference object,
int allocator)
Trace an object under a copying collection policy. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int LOCAL_GC_BITS_REQUIRED
public static final int GLOBAL_GC_BITS_REQUIRED
public static final int GC_HEADER_WORDS_REQUIRED
private static final int META_DATA_PAGES_PER_REGION
private boolean fromSpace
| Constructor Detail |
|---|
public CopySpace(String name,
int pageBudget,
boolean fromSpace,
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 planfromSpace - The does this instance start life as from-space
(or to-space)?vmRequest - An object describing the virtual memory requested.| Method Detail |
|---|
public boolean isFromSpace()
public boolean isMovable()
isMovable in class Spacepublic void prepare(boolean fromSpace)
fromSpace - Set the fromSpace field to this valuepublic void release()
public void release(Address start)
release in class Spacestart - The address of the start of the page or pages
public ObjectReference traceObject(TransitiveClosure trace,
ObjectReference object)
traceObject in class Spacetrace - The trace being conducted.object - The object to be forwarded.
public ObjectReference traceObject(TransitiveClosure trace,
ObjectReference object,
int allocator)
trace - The trace being conducted.object - The object to be forwarded.allocator - The allocator to use when copying.
public boolean isLive(ObjectReference object)
isLive in class Spaceobject - The object in question
public boolean isReachable(ObjectReference object)
isReachable in class Spaceobject - The object reference.
public void postAlloc(ObjectReference object)
object - the object ref to the storage to be initialized
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||