Class NativeAllocator
java.lang.Object
org.apache.cassandra.utils.memory.MemtableAllocator
org.apache.cassandra.utils.memory.NativeAllocator
This NativeAllocator uses global slab allocation strategy
with slab size that scales exponentially from 8KiB to 1MiB to
serve allocation of up to 128KiB.
The slab allocation reduces heap fragmentation from small long-lived objects.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.cassandra.utils.memory.MemtableAllocator
MemtableAllocator.SubAllocator -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionlongallocate(int size, OpOrder.Group opGroup) clone(DecoratedKey key, OpOrder.Group writeOp) cloner(OpOrder.Group opGroup) rowBuilder(OpOrder.Group opGroup) voidIndicate the memory and resources owned by this allocator are no longer referenced, and can be reclaimed/reused.Methods inherited from class org.apache.cassandra.utils.memory.MemtableAllocator
isLive, offHeap, onHeap, setDiscarding
-
Constructor Details
-
NativeAllocator
-
-
Method Details
-
rowBuilder
-
clone
-
cloner
- Specified by:
clonerin classMemtableAllocator
-
ensureOnHeap
- Specified by:
ensureOnHeapin classMemtableAllocator
-
allocate
-
setDiscarded
public void setDiscarded()Description copied from class:MemtableAllocatorIndicate the memory and resources owned by this allocator are no longer referenced, and can be reclaimed/reused.- Overrides:
setDiscardedin classMemtableAllocator
-