| 限定符和类型 | 字段和说明 |
|---|---|
protected AtomicLong |
actualUsed
offheap memory size had been actualUsed.
|
protected long |
capacity |
protected int[] |
CHUNK_SIZE_LIST |
protected int |
chunkSize
minim size of chunk
|
protected int |
slabSize
it is also the max Chunk Size
|
protected AtomicLong |
used |
| 构造器和说明 |
|---|
SlabsAllocator(long capacity,
float expandFactor,
int chunkSize,
int slabSize) |
| 限定符和类型 | 方法和说明 |
|---|---|
long |
actualUsed()
the memory size actualUsed.
|
MemoryBuffer |
allocate(int size)
allocate memory buf.
|
void |
destroy()
destroy allocator, dispose all resources.
|
long |
getCapacity()
the capacity
|
long |
used() |
protected final int chunkSize
protected final int slabSize
protected final int[] CHUNK_SIZE_LIST
protected final long capacity
protected final AtomicLong used
protected final AtomicLong actualUsed
public SlabsAllocator(long capacity,
float expandFactor,
int chunkSize,
int slabSize)
public MemoryBuffer allocate(int size)
Allocatorpublic long getCapacity()
AllocatorgetCapacity 在接口中 Allocatorpublic long actualUsed()
AllocatoractualUsed 在接口中 AllocatorCopyright © 2014. All rights reserved.