Modifier and Type | Field and Description |
---|---|
(package private) static int |
BLOCK_DEFRAG_STATE_TABLE_BYTES |
private static short |
BLOCK_IS_DEFRAG_SOURCE |
private static short |
BLOCK_IS_NOT_DEFRAG_SOURCE |
(package private) static int |
BLOCK_STATE_TABLE_BYTES |
(package private) static int |
BYTES_IN_BLOCK_DEFRAG_STATE_ENTRY |
(package private) static int |
BYTES_IN_BLOCK_STATE_ENTRY |
(package private) static int |
LOG_BYTES_IN_BLOCK_DEFRAG_STATE_ENTRY |
(package private) static int |
LOG_BYTES_IN_BLOCK_STATE_ENTRY |
private static short |
REUSED_BLOCK_STATE |
private static short |
UNALLOCATED_BLOCK_STATE |
private static short |
UNMARKED_BLOCK_STATE |
Constructor and Description |
---|
Block() |
Modifier and Type | Method and Description |
---|---|
(package private) static Address |
align(Address ptr) |
(package private) static void |
clearConservativeSpillCount(Address address) |
static short |
getBlockMarkState(Address address) |
(package private) static Address |
getBlockMarkStateAddress(Address address) |
private static int |
getChunkIndex(Address block) |
(package private) static short |
getConservativeSpillCount(Address address) |
(package private) static Address |
getDefragStateAddress(Address address) |
(package private) static short |
getMarkState(Address cursor) |
static boolean |
isAligned(Address address) |
static boolean |
isDefragSource(Address address) |
static boolean |
isUnused(Address address) |
(package private) static boolean |
isUnusedState(Address cursor) |
(package private) static void |
resetLineMarksAndDefragStateTable(short threshold,
Address markStateBase,
Address defragStateBase,
Address lineMarkBase,
int block) |
(package private) static void |
setBlockAsInUse(Address address) |
static void |
setBlockAsReused(Address address) |
(package private) static void |
setBlockAsUnallocated(Address address) |
private static void |
setBlockState(Address address,
short value) |
(package private) static void |
setState(Address cursor,
short value) |
(package private) static short |
sweepOneBlock(Address block,
int[] markHistogram,
byte markState,
boolean resetMarkState)
Sweeps one block.
|
private static final short UNALLOCATED_BLOCK_STATE
private static final short UNMARKED_BLOCK_STATE
private static final short REUSED_BLOCK_STATE
private static final short BLOCK_IS_NOT_DEFRAG_SOURCE
private static final short BLOCK_IS_DEFRAG_SOURCE
static final int LOG_BYTES_IN_BLOCK_STATE_ENTRY
static final int BYTES_IN_BLOCK_STATE_ENTRY
static final int BLOCK_STATE_TABLE_BYTES
static final int LOG_BYTES_IN_BLOCK_DEFRAG_STATE_ENTRY
static final int BYTES_IN_BLOCK_DEFRAG_STATE_ENTRY
static final int BLOCK_DEFRAG_STATE_TABLE_BYTES
public Block()
private static int getChunkIndex(Address block)
public static boolean isUnused(Address address)
address
- the block's addressstatic boolean isUnusedState(Address cursor)
static short getMarkState(Address cursor)
public static short getBlockMarkState(Address address)
static void setBlockAsInUse(Address address)
public static void setBlockAsReused(Address address)
static void setBlockAsUnallocated(Address address)
private static void setBlockState(Address address, short value)
static Address getBlockMarkStateAddress(Address address)
static short sweepOneBlock(Address block, int[] markHistogram, byte markState, boolean resetMarkState)
TODO: needs better documentation.
block
- the block's addressmarkHistogram
- the mark histogrammarkState
- the mark valueresetMarkState
- whether to reset the mark statepublic static boolean isDefragSource(Address address)
address
- the block's addressBLOCK_IS_DEFRAG_SOURCE
static void clearConservativeSpillCount(Address address)
static short getConservativeSpillCount(Address address)
static Address getDefragStateAddress(Address address)
static void resetLineMarksAndDefragStateTable(short threshold, Address markStateBase, Address defragStateBase, Address lineMarkBase, int block)