public class org.apache.cassandra.utils.memory.NativeAllocator extends org.apache.cassandra.utils.memory.MemtableAllocator
minor version: 0
major version: 59
flags: flags: (0x0021) ACC_PUBLIC, ACC_SUPER
this_class: org.apache.cassandra.utils.memory.NativeAllocator
super_class: org.apache.cassandra.utils.memory.MemtableAllocator
{
private static final int MAX_REGION_SIZE;
descriptor: I
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
ConstantValue: 1048576
private static final int MAX_CLONED_SIZE;
descriptor: I
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
ConstantValue: 131072
private static final int MIN_REGION_SIZE;
descriptor: I
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
ConstantValue: 8192
private static final java.util.Map<java.lang.Integer, org.apache.cassandra.utils.memory.NativeAllocator$RaceAllocated> RACE_ALLOCATED;
descriptor: Ljava/util/Map;
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
Signature: Ljava/util/Map<Ljava/lang/Integer;Lorg/apache/cassandra/utils/memory/NativeAllocator$RaceAllocated;>;
private final java.util.concurrent.atomic.AtomicReference<org.apache.cassandra.utils.memory.NativeAllocator$Region> currentRegion;
descriptor: Ljava/util/concurrent/atomic/AtomicReference;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
Signature: Ljava/util/concurrent/atomic/AtomicReference<Lorg/apache/cassandra/utils/memory/NativeAllocator$Region;>;
private final java.util.concurrent.ConcurrentLinkedQueue<org.apache.cassandra.utils.memory.NativeAllocator$Region> regions;
descriptor: Ljava/util/concurrent/ConcurrentLinkedQueue;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
Signature: Ljava/util/concurrent/ConcurrentLinkedQueue<Lorg/apache/cassandra/utils/memory/NativeAllocator$Region;>;
private final org.apache.cassandra.utils.memory.EnsureOnHeap$CloneToHeap cloneToHeap;
descriptor: Lorg/apache/cassandra/utils/memory/EnsureOnHeap$CloneToHeap;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
static final boolean $assertionsDisabled;
descriptor: Z
flags: (0x1018) ACC_STATIC, ACC_FINAL, ACC_SYNTHETIC
static void <clinit>();
descriptor: ()V
flags: (0x0008) ACC_STATIC
Code:
stack=4, locals=1, args_size=0
0: ldc Lorg/apache/cassandra/utils/memory/NativeAllocator;
invokevirtual java.lang.Class.desiredAssertionStatus:()Z
ifne 1
iconst_1
goto 2
StackMap locals:
StackMap stack:
1: iconst_0
StackMap locals:
StackMap stack: int
2: putstatic org.apache.cassandra.utils.memory.NativeAllocator.$assertionsDisabled:Z
3: new java.util.HashMap
dup
invokespecial java.util.HashMap.<init>:()V
putstatic org.apache.cassandra.utils.memory.NativeAllocator.RACE_ALLOCATED:Ljava/util/Map;
4: sipush 8192
istore 0
start local 0 5: goto 8
6: StackMap locals: int
StackMap stack:
getstatic org.apache.cassandra.utils.memory.NativeAllocator.RACE_ALLOCATED:Ljava/util/Map;
iload 0
invokestatic java.lang.Integer.valueOf:(I)Ljava/lang/Integer;
new org.apache.cassandra.utils.memory.NativeAllocator$RaceAllocated
dup
invokespecial org.apache.cassandra.utils.memory.NativeAllocator$RaceAllocated.<init>:()V
invokeinterface java.util.Map.put:(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
pop
7: iload 0
iconst_2
imul
istore 0
StackMap locals:
StackMap stack:
8: iload 0
ldc 1048576
if_icmple 6
end local 0 9: return
LocalVariableTable:
Start End Slot Name Signature
5 9 0 i I
protected void <init>(org.apache.cassandra.utils.memory.NativePool);
descriptor: (Lorg/apache/cassandra/utils/memory/NativePool;)V
flags: (0x0004) ACC_PROTECTED
Code:
stack=3, locals=2, args_size=2
start local 0 start local 1 0: aload 0
aload 1
getfield org.apache.cassandra.utils.memory.NativePool.onHeap:Lorg/apache/cassandra/utils/memory/MemtablePool$SubPool;
invokevirtual org.apache.cassandra.utils.memory.MemtablePool$SubPool.newAllocator:()Lorg/apache/cassandra/utils/memory/MemtableAllocator$SubAllocator;
aload 1
getfield org.apache.cassandra.utils.memory.NativePool.offHeap:Lorg/apache/cassandra/utils/memory/MemtablePool$SubPool;
invokevirtual org.apache.cassandra.utils.memory.MemtablePool$SubPool.newAllocator:()Lorg/apache/cassandra/utils/memory/MemtableAllocator$SubAllocator;
invokespecial org.apache.cassandra.utils.memory.MemtableAllocator.<init>:(Lorg/apache/cassandra/utils/memory/MemtableAllocator$SubAllocator;Lorg/apache/cassandra/utils/memory/MemtableAllocator$SubAllocator;)V
1: aload 0
new java.util.concurrent.atomic.AtomicReference
dup
invokespecial java.util.concurrent.atomic.AtomicReference.<init>:()V
putfield org.apache.cassandra.utils.memory.NativeAllocator.currentRegion:Ljava/util/concurrent/atomic/AtomicReference;
2: aload 0
new java.util.concurrent.ConcurrentLinkedQueue
dup
invokespecial java.util.concurrent.ConcurrentLinkedQueue.<init>:()V
putfield org.apache.cassandra.utils.memory.NativeAllocator.regions:Ljava/util/concurrent/ConcurrentLinkedQueue;
3: aload 0
new org.apache.cassandra.utils.memory.EnsureOnHeap$CloneToHeap
dup
invokespecial org.apache.cassandra.utils.memory.EnsureOnHeap$CloneToHeap.<init>:()V
putfield org.apache.cassandra.utils.memory.NativeAllocator.cloneToHeap:Lorg/apache/cassandra/utils/memory/EnsureOnHeap$CloneToHeap;
4: return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 5 0 this Lorg/apache/cassandra/utils/memory/NativeAllocator;
0 5 1 pool Lorg/apache/cassandra/utils/memory/NativePool;
MethodParameters:
Name Flags
pool
public org.apache.cassandra.db.rows.Row$Builder rowBuilder(org.apache.cassandra.utils.concurrent.OpOrder$Group);
descriptor: (Lorg/apache/cassandra/utils/concurrent/OpOrder$Group;)Lorg/apache/cassandra/db/rows/Row$Builder;
flags: (0x0001) ACC_PUBLIC
Code:
stack=4, locals=2, args_size=2
start local 0 start local 1 0: new org.apache.cassandra.utils.memory.NativeAllocator$CloningBTreeRowBuilder
dup
aload 1
aload 0
invokespecial org.apache.cassandra.utils.memory.NativeAllocator$CloningBTreeRowBuilder.<init>:(Lorg/apache/cassandra/utils/concurrent/OpOrder$Group;Lorg/apache/cassandra/utils/memory/NativeAllocator;)V
areturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lorg/apache/cassandra/utils/memory/NativeAllocator;
0 1 1 opGroup Lorg/apache/cassandra/utils/concurrent/OpOrder$Group;
MethodParameters:
Name Flags
opGroup
public org.apache.cassandra.db.DecoratedKey clone(org.apache.cassandra.db.DecoratedKey, org.apache.cassandra.utils.concurrent.OpOrder$Group);
descriptor: (Lorg/apache/cassandra/db/DecoratedKey;Lorg/apache/cassandra/utils/concurrent/OpOrder$Group;)Lorg/apache/cassandra/db/DecoratedKey;
flags: (0x0001) ACC_PUBLIC
Code:
stack=6, locals=3, args_size=3
start local 0 start local 1 start local 2 0: new org.apache.cassandra.db.NativeDecoratedKey
dup
aload 1
invokevirtual org.apache.cassandra.db.DecoratedKey.getToken:()Lorg/apache/cassandra/dht/Token;
aload 0
aload 2
aload 1
invokevirtual org.apache.cassandra.db.DecoratedKey.getKey:()Ljava/nio/ByteBuffer;
invokespecial org.apache.cassandra.db.NativeDecoratedKey.<init>:(Lorg/apache/cassandra/dht/Token;Lorg/apache/cassandra/utils/memory/NativeAllocator;Lorg/apache/cassandra/utils/concurrent/OpOrder$Group;Ljava/nio/ByteBuffer;)V
areturn
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lorg/apache/cassandra/utils/memory/NativeAllocator;
0 1 1 key Lorg/apache/cassandra/db/DecoratedKey;
0 1 2 writeOp Lorg/apache/cassandra/utils/concurrent/OpOrder$Group;
MethodParameters:
Name Flags
key
writeOp
public org.apache.cassandra.utils.memory.EnsureOnHeap ensureOnHeap();
descriptor: ()Lorg/apache/cassandra/utils/memory/EnsureOnHeap;
flags: (0x0001) ACC_PUBLIC
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
getfield org.apache.cassandra.utils.memory.NativeAllocator.cloneToHeap:Lorg/apache/cassandra/utils/memory/EnsureOnHeap$CloneToHeap;
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lorg/apache/cassandra/utils/memory/NativeAllocator;
public long allocate(int, org.apache.cassandra.utils.concurrent.OpOrder$Group);
descriptor: (ILorg/apache/cassandra/utils/concurrent/OpOrder$Group;)J
flags: (0x0001) ACC_PUBLIC
Code:
stack=4, locals=6, args_size=3
start local 0 start local 1 start local 2 0: getstatic org.apache.cassandra.utils.memory.NativeAllocator.$assertionsDisabled:Z
ifne 1
iload 1
ifge 1
new java.lang.AssertionError
dup
invokespecial java.lang.AssertionError.<init>:()V
athrow
1: StackMap locals:
StackMap stack:
aload 0
invokevirtual org.apache.cassandra.utils.memory.NativeAllocator.offHeap:()Lorg/apache/cassandra/utils/memory/MemtableAllocator$SubAllocator;
iload 1
i2l
aload 2
invokevirtual org.apache.cassandra.utils.memory.MemtableAllocator$SubAllocator.allocate:(JLorg/apache/cassandra/utils/concurrent/OpOrder$Group;)V
2: iload 1
ldc 131072
if_icmple 4
3: aload 0
iload 1
invokevirtual org.apache.cassandra.utils.memory.NativeAllocator.allocateOversize:(I)J
lreturn
4: StackMap locals:
StackMap stack:
aload 0
getfield org.apache.cassandra.utils.memory.NativeAllocator.currentRegion:Ljava/util/concurrent/atomic/AtomicReference;
invokevirtual java.util.concurrent.atomic.AtomicReference.get:()Ljava/lang/Object;
checkcast org.apache.cassandra.utils.memory.NativeAllocator$Region
astore 3
start local 3 5: aload 3
ifnull 8
aload 3
iload 1
invokevirtual org.apache.cassandra.utils.memory.NativeAllocator$Region.allocate:(I)J
dup2
lstore 4
start local 4 6: lconst_0
lcmp
ifle 8
7: lload 4
lreturn
end local 4 8: StackMap locals: org.apache.cassandra.utils.memory.NativeAllocator$Region
StackMap stack:
aload 0
aload 3
iload 1
invokevirtual org.apache.cassandra.utils.memory.NativeAllocator.trySwapRegion:(Lorg/apache/cassandra/utils/memory/NativeAllocator$Region;I)V
end local 3 9: goto 4
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 10 0 this Lorg/apache/cassandra/utils/memory/NativeAllocator;
0 10 1 size I
0 10 2 opGroup Lorg/apache/cassandra/utils/concurrent/OpOrder$Group;
5 9 3 region Lorg/apache/cassandra/utils/memory/NativeAllocator$Region;
6 8 4 peer J
MethodParameters:
Name Flags
size
opGroup
private void trySwapRegion(org.apache.cassandra.utils.memory.NativeAllocator$Region, int);
descriptor: (Lorg/apache/cassandra/utils/memory/NativeAllocator$Region;I)V
flags: (0x0002) ACC_PRIVATE
Code:
stack=5, locals=6, args_size=3
start local 0 start local 1 start local 2 0: aload 1
ifnonnull 2
sipush 8192
istore 3
start local 3 1: goto 3
end local 3 2: StackMap locals:
StackMap stack:
aload 1
getfield org.apache.cassandra.utils.memory.NativeAllocator$Region.capacity:I
iconst_2
imul
istore 3
start local 3 3: StackMap locals: int
StackMap stack:
iload 2
iload 3
if_icmple 5
4: iload 2
invokestatic java.lang.Integer.highestOneBit:(I)I
iconst_3
ishl
istore 3
5: StackMap locals:
StackMap stack:
ldc 1048576
iload 3
invokestatic java.lang.Math.min:(II)I
istore 3
6: getstatic org.apache.cassandra.utils.memory.NativeAllocator.RACE_ALLOCATED:Ljava/util/Map;
iload 3
invokestatic java.lang.Integer.valueOf:(I)Ljava/lang/Integer;
invokeinterface java.util.Map.get:(Ljava/lang/Object;)Ljava/lang/Object;
checkcast org.apache.cassandra.utils.memory.NativeAllocator$RaceAllocated
astore 4
start local 4 7: aload 4
invokevirtual org.apache.cassandra.utils.memory.NativeAllocator$RaceAllocated.poll:()Lorg/apache/cassandra/utils/memory/NativeAllocator$Region;
astore 5
start local 5 8: aload 5
ifnonnull 10
9: new org.apache.cassandra.utils.memory.NativeAllocator$Region
dup
iload 3
i2l
invokestatic org.apache.cassandra.utils.memory.MemoryUtil.allocate:(J)J
iload 3
invokespecial org.apache.cassandra.utils.memory.NativeAllocator$Region.<init>:(JI)V
astore 5
10: StackMap locals: org.apache.cassandra.utils.memory.NativeAllocator$RaceAllocated org.apache.cassandra.utils.memory.NativeAllocator$Region
StackMap stack:
aload 0
getfield org.apache.cassandra.utils.memory.NativeAllocator.currentRegion:Ljava/util/concurrent/atomic/AtomicReference;
aload 1
aload 5
invokevirtual java.util.concurrent.atomic.AtomicReference.compareAndSet:(Ljava/lang/Object;Ljava/lang/Object;)Z
ifeq 12
11: aload 0
getfield org.apache.cassandra.utils.memory.NativeAllocator.regions:Ljava/util/concurrent/ConcurrentLinkedQueue;
aload 5
invokevirtual java.util.concurrent.ConcurrentLinkedQueue.add:(Ljava/lang/Object;)Z
pop
goto 14
12: StackMap locals:
StackMap stack:
aload 4
aload 5
invokevirtual org.apache.cassandra.utils.memory.NativeAllocator$RaceAllocated.stash:(Lorg/apache/cassandra/utils/memory/NativeAllocator$Region;)Z
ifne 14
13: aload 5
getfield org.apache.cassandra.utils.memory.NativeAllocator$Region.peer:J
invokestatic org.apache.cassandra.utils.memory.MemoryUtil.free:(J)V
14: StackMap locals:
StackMap stack:
return
end local 5 end local 4 end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 15 0 this Lorg/apache/cassandra/utils/memory/NativeAllocator;
0 15 1 current Lorg/apache/cassandra/utils/memory/NativeAllocator$Region;
0 15 2 minSize I
1 2 3 size I
3 15 3 size I
7 15 4 raceAllocated Lorg/apache/cassandra/utils/memory/NativeAllocator$RaceAllocated;
8 15 5 next Lorg/apache/cassandra/utils/memory/NativeAllocator$Region;
MethodParameters:
Name Flags
current
minSize
private long allocateOversize(int);
descriptor: (I)J
flags: (0x0002) ACC_PRIVATE
Code:
stack=5, locals=5, args_size=2
start local 0 start local 1 0: new org.apache.cassandra.utils.memory.NativeAllocator$Region
dup
iload 1
i2l
invokestatic org.apache.cassandra.utils.memory.MemoryUtil.allocate:(J)J
iload 1
invokespecial org.apache.cassandra.utils.memory.NativeAllocator$Region.<init>:(JI)V
astore 2
start local 2 1: aload 0
getfield org.apache.cassandra.utils.memory.NativeAllocator.regions:Ljava/util/concurrent/ConcurrentLinkedQueue;
aload 2
invokevirtual java.util.concurrent.ConcurrentLinkedQueue.add:(Ljava/lang/Object;)Z
pop
2: aload 2
iload 1
invokevirtual org.apache.cassandra.utils.memory.NativeAllocator$Region.allocate:(I)J
dup2
lstore 3
start local 3 3: ldc -1
lcmp
ifne 5
4: new java.lang.AssertionError
dup
invokespecial java.lang.AssertionError.<init>:()V
athrow
5: StackMap locals: org.apache.cassandra.utils.memory.NativeAllocator$Region long
StackMap stack:
lload 3
lreturn
end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 6 0 this Lorg/apache/cassandra/utils/memory/NativeAllocator;
0 6 1 size I
1 6 2 region Lorg/apache/cassandra/utils/memory/NativeAllocator$Region;
3 6 3 peer J
MethodParameters:
Name Flags
size
public void setDiscarded();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
Code:
stack=2, locals=3, args_size=1
start local 0 0: aload 0
getfield org.apache.cassandra.utils.memory.NativeAllocator.regions:Ljava/util/concurrent/ConcurrentLinkedQueue;
invokevirtual java.util.concurrent.ConcurrentLinkedQueue.iterator:()Ljava/util/Iterator;
astore 2
goto 3
StackMap locals: org.apache.cassandra.utils.memory.NativeAllocator top java.util.Iterator
StackMap stack:
1: aload 2
invokeinterface java.util.Iterator.next:()Ljava/lang/Object;
checkcast org.apache.cassandra.utils.memory.NativeAllocator$Region
astore 1
start local 1 2: aload 1
getfield org.apache.cassandra.utils.memory.NativeAllocator$Region.peer:J
invokestatic org.apache.cassandra.utils.memory.MemoryUtil.free:(J)V
end local 1 3: StackMap locals:
StackMap stack:
aload 2
invokeinterface java.util.Iterator.hasNext:()Z
ifne 1
4: aload 0
invokespecial org.apache.cassandra.utils.memory.MemtableAllocator.setDiscarded:()V
5: return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 6 0 this Lorg/apache/cassandra/utils/memory/NativeAllocator;
2 3 1 region Lorg/apache/cassandra/utils/memory/NativeAllocator$Region;
}
SourceFile: "NativeAllocator.java"
NestMembers:
org.apache.cassandra.utils.memory.NativeAllocator$CloningBTreeRowBuilder org.apache.cassandra.utils.memory.NativeAllocator$RaceAllocated org.apache.cassandra.utils.memory.NativeAllocator$Region
InnerClasses:
public abstract Builder = org.apache.cassandra.db.rows.Row$Builder of org.apache.cassandra.db.rows.Row
public final Group = org.apache.cassandra.utils.concurrent.OpOrder$Group of org.apache.cassandra.utils.concurrent.OpOrder
CloneToHeap = org.apache.cassandra.utils.memory.EnsureOnHeap$CloneToHeap of org.apache.cassandra.utils.memory.EnsureOnHeap
public final SubAllocator = org.apache.cassandra.utils.memory.MemtableAllocator$SubAllocator of org.apache.cassandra.utils.memory.MemtableAllocator
public SubPool = org.apache.cassandra.utils.memory.MemtablePool$SubPool of org.apache.cassandra.utils.memory.MemtablePool
private CloningBTreeRowBuilder = org.apache.cassandra.utils.memory.NativeAllocator$CloningBTreeRowBuilder of org.apache.cassandra.utils.memory.NativeAllocator
private RaceAllocated = org.apache.cassandra.utils.memory.NativeAllocator$RaceAllocated of org.apache.cassandra.utils.memory.NativeAllocator
private Region = org.apache.cassandra.utils.memory.NativeAllocator$Region of org.apache.cassandra.utils.memory.NativeAllocator