Class NativeAllocator
- java.lang.Object
-
- org.apache.cassandra.utils.memory.MemtableAllocator
-
- org.apache.cassandra.utils.memory.NativeAllocator
-
public class NativeAllocator extends MemtableAllocator
This NativeAllocator uses global slab allocation strategy with slab size that scales exponentially from 8KiB to 1MiB to serve allocation of up to 128KiB.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.cassandra.utils.memory.MemtableAllocator
MemtableAllocator.SubAllocator
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
NativeAllocator(NativePool pool)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description long
allocate(int size, OpOrder.Group opGroup)
DecoratedKey
clone(DecoratedKey key, OpOrder.Group writeOp)
Cloner
cloner(OpOrder.Group opGroup)
EnsureOnHeap
ensureOnHeap()
Row.Builder
rowBuilder(OpOrder.Group opGroup)
void
setDiscarded()
Indicate 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 Detail
-
NativeAllocator
protected NativeAllocator(NativePool pool)
-
-
Method Detail
-
rowBuilder
public Row.Builder rowBuilder(OpOrder.Group opGroup)
-
clone
public DecoratedKey clone(DecoratedKey key, OpOrder.Group writeOp)
-
cloner
public Cloner cloner(OpOrder.Group opGroup)
- Specified by:
cloner
in classMemtableAllocator
-
ensureOnHeap
public EnsureOnHeap ensureOnHeap()
- Specified by:
ensureOnHeap
in classMemtableAllocator
-
allocate
public long allocate(int size, OpOrder.Group opGroup)
-
setDiscarded
public void setDiscarded()
Description copied from class:MemtableAllocator
Indicate the memory and resources owned by this allocator are no longer referenced, and can be reclaimed/reused.- Overrides:
setDiscarded
in classMemtableAllocator
-
-