public static class ByteBlockPool.DirectTrackingAllocator extends ByteBlockPool.Allocator
ByteBlockPool.Allocator
that never recycles, but
tracks how much total RAM is in use.Modifier and Type | Field and Description |
---|---|
private Counter |
bytesUsed |
blockSize
Constructor and Description |
---|
DirectTrackingAllocator(Counter bytesUsed) |
DirectTrackingAllocator(int blockSize,
Counter bytesUsed) |
Modifier and Type | Method and Description |
---|---|
byte[] |
getByteBlock() |
void |
recycleByteBlocks(byte[][] blocks,
int start,
int end) |
recycleByteBlocks
private final Counter bytesUsed
public DirectTrackingAllocator(Counter bytesUsed)
public DirectTrackingAllocator(int blockSize, Counter bytesUsed)
public byte[] getByteBlock()
getByteBlock
in class ByteBlockPool.Allocator
public void recycleByteBlocks(byte[][] blocks, int start, int end)
recycleByteBlocks
in class ByteBlockPool.Allocator