Modifier and Type | Field and Description |
---|---|
private static int |
CHUNK_MAP_BLOCKS |
private AddressArray |
chunkMap |
private int |
chunkMapCursor |
private int |
chunkMapLimit |
private static int |
ENTRIES_IN_CHUNK_MAP_BLOCK |
private static int |
LOG_PAGES_IN_CHUNK_MAP_BLOCK |
private static int |
MAX_ENTRIES_IN_CHUNK_MAP |
Constructor and Description |
---|
ChunkList() |
Modifier and Type | Method and Description |
---|---|
(package private) void |
addNewChunkToMap(Address chunk) |
private void |
checkMap() |
void |
consolidateMap() |
Address |
firstChunk(int ordinal,
int stride) |
private int |
getChunkIndex(int entry) |
private int |
getChunkMap(int entry) |
Address |
getHeadChunk() |
private Address |
getMapAddress(int entry) |
Address |
getTailChunk() |
Address |
nextChunk(Address chunk)
A chunk iterator.
|
private Address |
nextChunk(Address chunk,
Address limit)
A chunk iterator.
|
Address |
nextChunk(Address chunk,
int start,
int stride)
A chunk iterator.
|
private Address |
nextChunk(int entry,
int start,
int stride)
A chunk iterator.
|
(package private) void |
removeChunkFromMap(Address chunk) |
(package private) void |
reset() |
private static final int LOG_PAGES_IN_CHUNK_MAP_BLOCK
private static final int ENTRIES_IN_CHUNK_MAP_BLOCK
private static final int CHUNK_MAP_BLOCKS
private static final int MAX_ENTRIES_IN_CHUNK_MAP
private final AddressArray chunkMap
private int chunkMapLimit
private int chunkMapCursor
public ChunkList()
void reset()
public Address getHeadChunk()
public Address getTailChunk()
void addNewChunkToMap(Address chunk)
void removeChunkFromMap(Address chunk)
private int getChunkIndex(int entry)
private int getChunkMap(int entry)
private Address getMapAddress(int entry)
public Address nextChunk(Address chunk)
chunk
- The chunkprivate Address nextChunk(Address chunk, Address limit)
null
if the
next chunk is limit.chunk
- The chunklimit
- The starting point (if next is equal to this, we're done)null
if next is limit.public Address nextChunk(Address chunk, int start, int stride)
null
if the next chunk is start.chunk
- The chunkstart
- The point where this iterator started, which defines its end-pointstride
- The stride by which the iterator should be steppednull
if next is start.private Address nextChunk(int entry, int start, int stride)
null
if the next chunk is start.entry
- The entry we're currently up tostart
- The point where this iterator started, which defines its end-pointstride
- The stride by which the iterator should be steppednull
if next is start.public Address firstChunk(int ordinal, int stride)
private void checkMap()
public void consolidateMap()