| Modifier and Type | Field and Description |
|---|---|
protected long |
chunkSize |
protected long |
entrySize |
protected long |
head |
protected static long |
headOffset |
protected long |
startAddress |
protected long |
totalMemory |
protected long |
totalPages |
protected java.util.concurrent.atomic.AtomicLong |
usedPages |
| Constructor and Description |
|---|
FixedSizeAllocator(long entrySize,
long chunkSize) |
FixedSizeAllocator(long startAddress,
long totalMemory,
long entrySize) |
FixedSizeAllocator(long startAddress,
long totalMemory,
long entrySize,
long head) |
| Modifier and Type | Method and Description |
|---|---|
long |
calloc(int size) |
long |
chunkSize() |
protected int |
countFreePages() |
long |
entrySize() |
void |
free(long entry) |
long |
freePages() |
protected long |
getMemoryFromSystem(long size) |
long |
head() |
long |
malloc() |
long |
malloc(int size) |
static void |
relocate(long currentPtr,
long delta) |
long |
startAddress() |
long |
totalMemory() |
long |
totalPages() |
long |
usedMemory() |
long |
usedPages() |
void |
verify()
Verify the layout of the heap.
|
protected static final long headOffset
protected volatile long head
protected java.util.concurrent.atomic.AtomicLong usedPages
protected final long startAddress
protected final long entrySize
protected final long chunkSize
protected long totalMemory
protected long totalPages
public FixedSizeAllocator(long entrySize,
long chunkSize)
public FixedSizeAllocator(long startAddress,
long totalMemory,
long entrySize)
public FixedSizeAllocator(long startAddress,
long totalMemory,
long entrySize,
long head)
public static void relocate(long currentPtr,
long delta)
public long head()
protected int countFreePages()
public long entrySize()
public long chunkSize()
public long startAddress()
public long totalMemory()
public long malloc()
public void verify()
Allocatorprotected long getMemoryFromSystem(long size)
public long usedPages()
public long totalPages()
public long freePages()
public long usedMemory()