|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.mmtk.utility.gcspy.Subspace
public class Subspace
This class is an abstraction of a contiguous region of a Space. For example, a semispace collector might choose to model the heap as a single Space, but within that Space it could model each semispace by a Subspace.
Subspace provides a number of useful facilities to many drivers, and is useful even if the Space comprises just a single contiguous region.
A subspace keeps track of the start and end address of the region, the index of its first block, the size of the blocks in this space, and the number of blocks in this subspace.
| Field Summary | |
|---|---|
private int |
blockNum_
|
private int |
blockSize_
|
private static boolean |
DEBUG
|
private Address |
end_
|
private int |
firstIndex_
|
private Address |
start_
|
| Constructor Summary | |
|---|---|
Subspace(Address start,
Address end,
int firstIndex,
int blockSize,
int blockNum)
Create a new subspace |
|
| Method Summary | |
|---|---|
boolean |
addressInRange(Address addr)
Is address in the range of this subspace? |
private void |
dump()
Dump a representation of the subspace |
Address |
getAddress(int index)
Get the address of start of block from its index |
int |
getBlockNum()
Get the number of tiles in this subspace |
int |
getBlockSize()
Get the blocksize for this subspace |
Address |
getEnd()
Get the end of this subspace |
int |
getFirstIndex()
Get the first index of subspace |
int |
getIndex(Address addr)
Get the block index from an address |
Address |
getStart()
Get the start of the subspace |
boolean |
indexInRange(int index)
Is an index in the range of this subspace? |
void |
reset(Address start,
Address end,
int blockNum)
Reset a new subspace. |
void |
reset(Address start,
Address end,
int firstIndex,
int blockNum)
Reset a new subspace |
private void |
reset(Address start,
Address end,
int firstIndex,
int blockSize,
int blockNum)
Reset a subspace. |
void |
reset(int firstIndex,
int blockNum)
Reset a new subspace. |
int |
spaceRemaining(Address addr)
Calculate the space remaining in a block after this address |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private Address start_
private Address end_
private int firstIndex_
private int blockSize_
private int blockNum_
private static final boolean DEBUG
| Constructor Detail |
|---|
public Subspace(Address start,
Address end,
int firstIndex,
int blockSize,
int blockNum)
start - The address of the start of the subspaceend - The address of the end of the subspacefirstIndex - The index of the first block of the subspaceblockSize - The size of blocks in this spaceblockNum - The number of blocks in this subspace| Method Detail |
|---|
private void reset(Address start,
Address end,
int firstIndex,
int blockSize,
int blockNum)
start - The address of the start of the subspaceend - The address of the end of the subspacefirstIndex - The index of the first block of the subspaceblockSize - The size of blocks in this subspaceblockNum - The number of blocks in this subspace
public void reset(Address start,
Address end,
int firstIndex,
int blockNum)
start - The address of the start of the subspaceend - The address of the end of the subspacefirstIndex - The index of the first block of the subspaceblockNum - The number of blocks in this subspace
public void reset(Address start,
Address end,
int blockNum)
start - The address of the start of the subspaceend - The address of the end of the subspaceblockNum - The number of blocks in this subspace
public void reset(int firstIndex,
int blockNum)
firstIndex - The index of the first block of the subspaceblockNum - The number of blocks in this subspacepublic boolean indexInRange(int index)
index - The index of the block
public boolean addressInRange(Address addr)
addr - An address
public int getIndex(Address addr)
addr - The address
public Address getAddress(int index)
index - The index of the block
public Address getStart()
public Address getEnd()
public int getFirstIndex()
public int getBlockSize()
public int getBlockNum()
public int spaceRemaining(Address addr)
addr - the Address
private void dump()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||