org.mmtk.policy.immix
Class Block
java.lang.Object
org.mmtk.policy.immix.Block
- All Implemented Interfaces:
- Constants
public class Block
- extends Object
- implements Constants
This class defines operations over block-granularity meta-data
Fields inherited from interface org.mmtk.utility.Constants |
ALIGNMENT_VALUE, ARRAY_ELEMENT, BITS_IN_ADDRESS, BITS_IN_BYTE, BITS_IN_CHAR, BITS_IN_INT, BITS_IN_PAGE, BITS_IN_SHORT, BITS_IN_WORD, BYTES_IN_ADDRESS, BYTES_IN_BYTE, BYTES_IN_CHAR, BYTES_IN_INT, BYTES_IN_KBYTE, BYTES_IN_MBYTE, BYTES_IN_PAGE, BYTES_IN_SHORT, BYTES_IN_WORD, CARD_MASK, CARD_META_PAGES_PER_REGION, INSTANCE_FIELD, LOG_BITS_IN_ADDRESS, LOG_BITS_IN_BYTE, LOG_BITS_IN_CHAR, LOG_BITS_IN_INT, LOG_BITS_IN_PAGE, LOG_BITS_IN_SHORT, LOG_BITS_IN_WORD, LOG_BYTES_IN_ADDRESS, LOG_BYTES_IN_ADDRESS_SPACE, LOG_BYTES_IN_BYTE, LOG_BYTES_IN_CHAR, LOG_BYTES_IN_INT, LOG_BYTES_IN_KBYTE, LOG_BYTES_IN_MBYTE, LOG_BYTES_IN_PAGE, LOG_BYTES_IN_SHORT, LOG_BYTES_IN_WORD, LOG_CARD_BYTES, LOG_CARD_GRAIN, LOG_CARD_META_BYTES, LOG_CARD_META_PAGES, LOG_CARD_META_SIZE, LOG_CARD_UNITS, LOG_MIN_ALIGNMENT, MAX_ALIGNMENT, MAX_BYTES_PADDING, MAX_INT, MIN_ALIGNMENT, MIN_INT, SUPPORT_CARD_SCANNING |
Constructor Summary |
Block()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
UNALLOCATED_BLOCK_STATE
private static final short UNALLOCATED_BLOCK_STATE
- See Also:
- Constant Field Values
UNMARKED_BLOCK_STATE
private static final short UNMARKED_BLOCK_STATE
REUSED_BLOCK_STATE
private static final short REUSED_BLOCK_STATE
BLOCK_IS_NOT_DEFRAG_SOURCE
private static final short BLOCK_IS_NOT_DEFRAG_SOURCE
- See Also:
- Constant Field Values
BLOCK_IS_DEFRAG_SOURCE
private static final short BLOCK_IS_DEFRAG_SOURCE
- See Also:
- Constant Field Values
LOG_BYTES_IN_BLOCK_STATE_ENTRY
static final int LOG_BYTES_IN_BLOCK_STATE_ENTRY
- See Also:
- Constant Field Values
BYTES_IN_BLOCK_STATE_ENTRY
static final int BYTES_IN_BLOCK_STATE_ENTRY
- See Also:
- Constant Field Values
BLOCK_STATE_TABLE_BYTES
static final int BLOCK_STATE_TABLE_BYTES
LOG_BYTES_IN_BLOCK_DEFRAG_STATE_ENTRY
static final int LOG_BYTES_IN_BLOCK_DEFRAG_STATE_ENTRY
- See Also:
- Constant Field Values
BYTES_IN_BLOCK_DEFRAG_STATE_ENTRY
static final int BYTES_IN_BLOCK_DEFRAG_STATE_ENTRY
- See Also:
- Constant Field Values
BLOCK_DEFRAG_STATE_TABLE_BYTES
static final int BLOCK_DEFRAG_STATE_TABLE_BYTES
Block
public Block()
align
static Address align(Address ptr)
isAligned
public static boolean isAligned(Address address)
getChunkIndex
private static int getChunkIndex(Address block)
isUnused
public static boolean isUnused(Address address)
isUnusedState
static boolean isUnusedState(Address cursor)
getMarkState
static short getMarkState(Address cursor)
setState
static void setState(Address cursor,
short value)
getBlockMarkState
public static short getBlockMarkState(Address address)
setBlockAsInUse
static void setBlockAsInUse(Address address)
setBlockAsReused
public static void setBlockAsReused(Address address)
setBlockAsUnallocated
static void setBlockAsUnallocated(Address address)
setBlockState
private static void setBlockState(Address address,
short value)
getBlockMarkStateAddress
static Address getBlockMarkStateAddress(Address address)
sweepOneBlock
static short sweepOneBlock(Address block,
int[] markHistogram,
byte markState,
boolean resetMarkState)
isDefragSource
public static boolean isDefragSource(Address address)
clearConservativeSpillCount
static void clearConservativeSpillCount(Address address)
getConservativeSpillCount
static short getConservativeSpillCount(Address address)
getDefragStateAddress
static Address getDefragStateAddress(Address address)
resetLineMarksAndDefragStateTable
static void resetLineMarksAndDefragStateTable(short threshold,
Address markStateBase,
Address defragStateBase,
Address lineMarkBase,
int block)