org.mmtk.policy
Class MarkCompactCollector.FromCursor

java.lang.Object
  extended by org.mmtk.policy.MarkCompactCollector.RegionCursor
      extended by org.mmtk.policy.MarkCompactCollector.FromCursor
Enclosing class:
MarkCompactCollector

private static final class MarkCompactCollector.FromCursor
extends MarkCompactCollector.RegionCursor

Subclass for the read-only cursor that leads the scan of regions.


Field Summary
 
Fields inherited from class org.mmtk.policy.MarkCompactCollector.RegionCursor
cursor, limit, region
 
Constructor Summary
MarkCompactCollector.FromCursor()
           
 
Method Summary
(package private)  void advanceToNextForwardableRegion(MarkCompactSpace space)
          Advance the cursor either to the next region in the list, or to a new region allocated from the global list.
(package private)  void advanceToNextRegion()
          Override the superclass with an additional assertion - we only advance when we have read to the end, and the cursor must point *precisely* to the last allocated byte in the region.
(package private)  ObjectReference advanceToObject()
          Advance from the cursor to the start of the next object.
(package private)  void advanceToObjectEnd(ObjectReference current)
          Advance the cursor to the end of the given object.
(package private)  boolean hasMoreObjects()
           
(package private)  void init(Address region)
          Initialize the cursor - the limit is the end of the allocated data
 
Methods inherited from class org.mmtk.policy.MarkCompactCollector.RegionCursor
assertCursorInBounds, get, getLimit, getRegion, inc, incTo, isAvailable, isInRegion, isValid, print, sameRegion
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MarkCompactCollector.FromCursor

public MarkCompactCollector.FromCursor()
Method Detail

init

void init(Address region)
Initialize the cursor - the limit is the end of the allocated data

Specified by:
init in class MarkCompactCollector.RegionCursor
Parameters:
region - The region to be processed.

advanceToObject

ObjectReference advanceToObject()
Advance from the cursor to the start of the next object.

Returns:
The object reference of the next object.

advanceToObjectEnd

void advanceToObjectEnd(ObjectReference current)
Advance the cursor to the end of the given object.


advanceToNextForwardableRegion

void advanceToNextForwardableRegion(MarkCompactSpace space)
Advance the cursor either to the next region in the list, or to a new region allocated from the global list.

Parameters:
space -

advanceToNextRegion

void advanceToNextRegion()
Override the superclass with an additional assertion - we only advance when we have read to the end, and the cursor must point *precisely* to the last allocated byte in the region.

Overrides:
advanceToNextRegion in class MarkCompactCollector.RegionCursor

hasMoreObjects

boolean hasMoreObjects()
Returns:
true if there are more objects in this region