public class org.apache.cassandra.utils.memory.SlabAllocator extends org.apache.cassandra.utils.memory.MemtableBufferAllocator
minor version: 0
major version: 59
flags: flags: (0x0021) ACC_PUBLIC, ACC_SUPER
this_class: org.apache.cassandra.utils.memory.SlabAllocator
super_class: org.apache.cassandra.utils.memory.MemtableBufferAllocator
{
private static final org.slf4j.Logger logger;
descriptor: Lorg/slf4j/Logger;
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
private static final int 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 java.util.concurrent.ConcurrentLinkedQueue<org.apache.cassandra.utils.memory.SlabAllocator$Region> RACE_ALLOCATED;
descriptor: Ljava/util/concurrent/ConcurrentLinkedQueue;
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
Signature: Ljava/util/concurrent/ConcurrentLinkedQueue<Lorg/apache/cassandra/utils/memory/SlabAllocator$Region;>;
private final java.util.concurrent.atomic.AtomicReference<org.apache.cassandra.utils.memory.SlabAllocator$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/SlabAllocator$Region;>;
private final java.util.concurrent.atomic.AtomicInteger regionCount;
descriptor: Ljava/util/concurrent/atomic/AtomicInteger;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
private final java.util.concurrent.ConcurrentLinkedQueue<org.apache.cassandra.utils.memory.SlabAllocator$Region> offHeapRegions;
descriptor: Ljava/util/concurrent/ConcurrentLinkedQueue;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
Signature: Ljava/util/concurrent/ConcurrentLinkedQueue<Lorg/apache/cassandra/utils/memory/SlabAllocator$Region;>;
private final java.util.concurrent.atomic.AtomicLong unslabbedSize;
descriptor: Ljava/util/concurrent/atomic/AtomicLong;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
private final boolean allocateOnHeapOnly;
descriptor: Z
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
private final org.apache.cassandra.utils.memory.EnsureOnHeap ensureOnHeap;
descriptor: Lorg/apache/cassandra/utils/memory/EnsureOnHeap;
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=2, locals=0, args_size=0
0: ldc Lorg/apache/cassandra/utils/memory/SlabAllocator;
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.SlabAllocator.$assertionsDisabled:Z
3: ldc Lorg/apache/cassandra/utils/memory/SlabAllocator;
invokestatic org.slf4j.LoggerFactory.getLogger:(Ljava/lang/Class;)Lorg/slf4j/Logger;
putstatic org.apache.cassandra.utils.memory.SlabAllocator.logger:Lorg/slf4j/Logger;
4: new java.util.concurrent.ConcurrentLinkedQueue
dup
invokespecial java.util.concurrent.ConcurrentLinkedQueue.<init>:()V
putstatic org.apache.cassandra.utils.memory.SlabAllocator.RACE_ALLOCATED:Ljava/util/concurrent/ConcurrentLinkedQueue;
return
LocalVariableTable:
Start End Slot Name Signature
void <init>(org.apache.cassandra.utils.memory.MemtableAllocator$SubAllocator, org.apache.cassandra.utils.memory.MemtableAllocator$SubAllocator, boolean);
descriptor: (Lorg/apache/cassandra/utils/memory/MemtableAllocator$SubAllocator;Lorg/apache/cassandra/utils/memory/MemtableAllocator$SubAllocator;Z)V
flags: (0x0000)
Code:
stack=5, locals=4, args_size=4
start local 0 start local 1 start local 2 start local 3 0: aload 0
aload 1
aload 2
invokespecial org.apache.cassandra.utils.memory.MemtableBufferAllocator.<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.SlabAllocator.currentRegion:Ljava/util/concurrent/atomic/AtomicReference;
2: aload 0
new java.util.concurrent.atomic.AtomicInteger
dup
iconst_0
invokespecial java.util.concurrent.atomic.AtomicInteger.<init>:(I)V
putfield org.apache.cassandra.utils.memory.SlabAllocator.regionCount:Ljava/util/concurrent/atomic/AtomicInteger;
3: aload 0
new java.util.concurrent.ConcurrentLinkedQueue
dup
invokespecial java.util.concurrent.ConcurrentLinkedQueue.<init>:()V
putfield org.apache.cassandra.utils.memory.SlabAllocator.offHeapRegions:Ljava/util/concurrent/ConcurrentLinkedQueue;
4: aload 0
new java.util.concurrent.atomic.AtomicLong
dup
lconst_0
invokespecial java.util.concurrent.atomic.AtomicLong.<init>:(J)V
putfield org.apache.cassandra.utils.memory.SlabAllocator.unslabbedSize:Ljava/util/concurrent/atomic/AtomicLong;
5: aload 0
iload 3
putfield org.apache.cassandra.utils.memory.SlabAllocator.allocateOnHeapOnly:Z
6: aload 0
iload 3
ifeq 7
new org.apache.cassandra.utils.memory.EnsureOnHeap$NoOp
dup
invokespecial org.apache.cassandra.utils.memory.EnsureOnHeap$NoOp.<init>:()V
goto 8
StackMap locals: org.apache.cassandra.utils.memory.SlabAllocator org.apache.cassandra.utils.memory.MemtableAllocator$SubAllocator org.apache.cassandra.utils.memory.MemtableAllocator$SubAllocator int
StackMap stack: org.apache.cassandra.utils.memory.SlabAllocator
7: new org.apache.cassandra.utils.memory.EnsureOnHeap$CloneToHeap
dup
invokespecial org.apache.cassandra.utils.memory.EnsureOnHeap$CloneToHeap.<init>:()V
StackMap locals: org.apache.cassandra.utils.memory.SlabAllocator org.apache.cassandra.utils.memory.MemtableAllocator$SubAllocator org.apache.cassandra.utils.memory.MemtableAllocator$SubAllocator int
StackMap stack: org.apache.cassandra.utils.memory.SlabAllocator org.apache.cassandra.utils.memory.EnsureOnHeap
8: putfield org.apache.cassandra.utils.memory.SlabAllocator.ensureOnHeap:Lorg/apache/cassandra/utils/memory/EnsureOnHeap;
9: return
end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 10 0 this Lorg/apache/cassandra/utils/memory/SlabAllocator;
0 10 1 onHeap Lorg/apache/cassandra/utils/memory/MemtableAllocator$SubAllocator;
0 10 2 offHeap Lorg/apache/cassandra/utils/memory/MemtableAllocator$SubAllocator;
0 10 3 allocateOnHeapOnly Z
MethodParameters:
Name Flags
onHeap
offHeap
allocateOnHeapOnly
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.SlabAllocator.ensureOnHeap:Lorg/apache/cassandra/utils/memory/EnsureOnHeap;
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lorg/apache/cassandra/utils/memory/SlabAllocator;
public java.nio.ByteBuffer allocate(int);
descriptor: (I)Ljava/nio/ByteBuffer;
flags: (0x0001) ACC_PUBLIC
Code:
stack=3, locals=2, args_size=2
start local 0 start local 1 0: aload 0
iload 1
aconst_null
invokevirtual org.apache.cassandra.utils.memory.SlabAllocator.allocate:(ILorg/apache/cassandra/utils/concurrent/OpOrder$Group;)Ljava/nio/ByteBuffer;
areturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lorg/apache/cassandra/utils/memory/SlabAllocator;
0 1 1 size I
MethodParameters:
Name Flags
size
public java.nio.ByteBuffer allocate(int, org.apache.cassandra.utils.concurrent.OpOrder$Group);
descriptor: (ILorg/apache/cassandra/utils/concurrent/OpOrder$Group;)Ljava/nio/ByteBuffer;
flags: (0x0001) ACC_PUBLIC
Code:
stack=4, locals=5, args_size=3
start local 0 start local 1 start local 2 0: getstatic org.apache.cassandra.utils.memory.SlabAllocator.$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:
iload 1
ifne 3
2: getstatic org.apache.cassandra.utils.ByteBufferUtil.EMPTY_BYTE_BUFFER:Ljava/nio/ByteBuffer;
areturn
3: StackMap locals:
StackMap stack:
aload 0
getfield org.apache.cassandra.utils.memory.SlabAllocator.allocateOnHeapOnly:Z
ifeq 4
aload 0
invokevirtual org.apache.cassandra.utils.memory.SlabAllocator.onHeap:()Lorg/apache/cassandra/utils/memory/MemtableAllocator$SubAllocator;
goto 5
StackMap locals:
StackMap stack:
4: aload 0
invokevirtual org.apache.cassandra.utils.memory.SlabAllocator.offHeap:()Lorg/apache/cassandra/utils/memory/MemtableAllocator$SubAllocator;
StackMap locals:
StackMap stack: org.apache.cassandra.utils.memory.MemtableAllocator$SubAllocator
5: iload 1
i2l
aload 2
invokevirtual org.apache.cassandra.utils.memory.MemtableAllocator$SubAllocator.allocate:(JLorg/apache/cassandra/utils/concurrent/OpOrder$Group;)V
6: iload 1
ldc 131072
if_icmple 13
7: aload 0
getfield org.apache.cassandra.utils.memory.SlabAllocator.unslabbedSize:Ljava/util/concurrent/atomic/AtomicLong;
iload 1
i2l
invokevirtual java.util.concurrent.atomic.AtomicLong.addAndGet:(J)J
pop2
8: aload 0
getfield org.apache.cassandra.utils.memory.SlabAllocator.allocateOnHeapOnly:Z
ifeq 10
9: iload 1
invokestatic java.nio.ByteBuffer.allocate:(I)Ljava/nio/ByteBuffer;
areturn
10: StackMap locals:
StackMap stack:
new org.apache.cassandra.utils.memory.SlabAllocator$Region
dup
iload 1
invokestatic java.nio.ByteBuffer.allocateDirect:(I)Ljava/nio/ByteBuffer;
invokespecial org.apache.cassandra.utils.memory.SlabAllocator$Region.<init>:(Ljava/nio/ByteBuffer;)V
astore 3
start local 3 11: aload 0
getfield org.apache.cassandra.utils.memory.SlabAllocator.offHeapRegions:Ljava/util/concurrent/ConcurrentLinkedQueue;
aload 3
invokevirtual java.util.concurrent.ConcurrentLinkedQueue.add:(Ljava/lang/Object;)Z
pop
12: aload 3
iload 1
invokevirtual org.apache.cassandra.utils.memory.SlabAllocator$Region.allocate:(I)Ljava/nio/ByteBuffer;
areturn
end local 3 13: StackMap locals:
StackMap stack:
aload 0
invokevirtual org.apache.cassandra.utils.memory.SlabAllocator.getRegion:()Lorg/apache/cassandra/utils/memory/SlabAllocator$Region;
astore 3
start local 3 14: aload 3
iload 1
invokevirtual org.apache.cassandra.utils.memory.SlabAllocator$Region.allocate:(I)Ljava/nio/ByteBuffer;
astore 4
start local 4 15: aload 4
ifnull 17
16: aload 4
areturn
17: StackMap locals: org.apache.cassandra.utils.memory.SlabAllocator$Region java.nio.ByteBuffer
StackMap stack:
aload 0
getfield org.apache.cassandra.utils.memory.SlabAllocator.currentRegion:Ljava/util/concurrent/atomic/AtomicReference;
aload 3
aconst_null
invokevirtual java.util.concurrent.atomic.AtomicReference.compareAndSet:(Ljava/lang/Object;Ljava/lang/Object;)Z
pop
end local 4 end local 3 18: goto 13
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 19 0 this Lorg/apache/cassandra/utils/memory/SlabAllocator;
0 19 1 size I
0 19 2 opGroup Lorg/apache/cassandra/utils/concurrent/OpOrder$Group;
11 13 3 region Lorg/apache/cassandra/utils/memory/SlabAllocator$Region;
14 18 3 region Lorg/apache/cassandra/utils/memory/SlabAllocator$Region;
15 18 4 cloned Ljava/nio/ByteBuffer;
MethodParameters:
Name Flags
size
opGroup
public void setDiscarded();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
Code:
stack=1, locals=3, args_size=1
start local 0 0: aload 0
getfield org.apache.cassandra.utils.memory.SlabAllocator.offHeapRegions:Ljava/util/concurrent/ConcurrentLinkedQueue;
invokevirtual java.util.concurrent.ConcurrentLinkedQueue.iterator:()Ljava/util/Iterator;
astore 2
goto 3
StackMap locals: org.apache.cassandra.utils.memory.SlabAllocator top java.util.Iterator
StackMap stack:
1: aload 2
invokeinterface java.util.Iterator.next:()Ljava/lang/Object;
checkcast org.apache.cassandra.utils.memory.SlabAllocator$Region
astore 1
start local 1 2: aload 1
getfield org.apache.cassandra.utils.memory.SlabAllocator$Region.data:Ljava/nio/ByteBuffer;
checkcast sun.nio.ch.DirectBuffer
invokeinterface sun.nio.ch.DirectBuffer.cleaner:()Lsun/misc/Cleaner;
invokevirtual sun.misc.Cleaner.clean:()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.MemtableBufferAllocator.setDiscarded:()V
5: return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 6 0 this Lorg/apache/cassandra/utils/memory/SlabAllocator;
2 3 1 region Lorg/apache/cassandra/utils/memory/SlabAllocator$Region;
private org.apache.cassandra.utils.memory.SlabAllocator$Region getRegion();
descriptor: ()Lorg/apache/cassandra/utils/memory/SlabAllocator$Region;
flags: (0x0002) ACC_PRIVATE
Code:
stack=4, locals=2, args_size=1
start local 0 0: StackMap locals:
StackMap stack:
aload 0
getfield org.apache.cassandra.utils.memory.SlabAllocator.currentRegion:Ljava/util/concurrent/atomic/AtomicReference;
invokevirtual java.util.concurrent.atomic.AtomicReference.get:()Ljava/lang/Object;
checkcast org.apache.cassandra.utils.memory.SlabAllocator$Region
astore 1
start local 1 1: aload 1
ifnull 3
2: aload 1
areturn
3: StackMap locals: org.apache.cassandra.utils.memory.SlabAllocator$Region
StackMap stack:
getstatic org.apache.cassandra.utils.memory.SlabAllocator.RACE_ALLOCATED:Ljava/util/concurrent/ConcurrentLinkedQueue;
invokevirtual java.util.concurrent.ConcurrentLinkedQueue.poll:()Ljava/lang/Object;
checkcast org.apache.cassandra.utils.memory.SlabAllocator$Region
astore 1
4: aload 1
ifnonnull 8
5: new org.apache.cassandra.utils.memory.SlabAllocator$Region
dup
aload 0
getfield org.apache.cassandra.utils.memory.SlabAllocator.allocateOnHeapOnly:Z
ifeq 6
ldc 1048576
invokestatic java.nio.ByteBuffer.allocate:(I)Ljava/nio/ByteBuffer;
goto 7
StackMap locals: org.apache.cassandra.utils.memory.SlabAllocator org.apache.cassandra.utils.memory.SlabAllocator$Region
StackMap stack: new 5 new 5
6: ldc 1048576
invokestatic java.nio.ByteBuffer.allocateDirect:(I)Ljava/nio/ByteBuffer;
StackMap locals: org.apache.cassandra.utils.memory.SlabAllocator org.apache.cassandra.utils.memory.SlabAllocator$Region
StackMap stack: new 5 new 5 java.nio.ByteBuffer
7: invokespecial org.apache.cassandra.utils.memory.SlabAllocator$Region.<init>:(Ljava/nio/ByteBuffer;)V
astore 1
8: StackMap locals:
StackMap stack:
aload 0
getfield org.apache.cassandra.utils.memory.SlabAllocator.currentRegion:Ljava/util/concurrent/atomic/AtomicReference;
aconst_null
aload 1
invokevirtual java.util.concurrent.atomic.AtomicReference.compareAndSet:(Ljava/lang/Object;Ljava/lang/Object;)Z
ifeq 14
9: aload 0
getfield org.apache.cassandra.utils.memory.SlabAllocator.allocateOnHeapOnly:Z
ifne 11
10: aload 0
getfield org.apache.cassandra.utils.memory.SlabAllocator.offHeapRegions:Ljava/util/concurrent/ConcurrentLinkedQueue;
aload 1
invokevirtual java.util.concurrent.ConcurrentLinkedQueue.add:(Ljava/lang/Object;)Z
pop
11: StackMap locals:
StackMap stack:
aload 0
getfield org.apache.cassandra.utils.memory.SlabAllocator.regionCount:Ljava/util/concurrent/atomic/AtomicInteger;
invokevirtual java.util.concurrent.atomic.AtomicInteger.incrementAndGet:()I
pop
12: getstatic org.apache.cassandra.utils.memory.SlabAllocator.logger:Lorg/slf4j/Logger;
ldc "{} regions now allocated in {}"
aload 0
getfield org.apache.cassandra.utils.memory.SlabAllocator.regionCount:Ljava/util/concurrent/atomic/AtomicInteger;
aload 0
invokeinterface org.slf4j.Logger.trace:(Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;)V
13: aload 1
areturn
14: StackMap locals:
StackMap stack:
getstatic org.apache.cassandra.utils.memory.SlabAllocator.RACE_ALLOCATED:Ljava/util/concurrent/ConcurrentLinkedQueue;
aload 1
invokevirtual java.util.concurrent.ConcurrentLinkedQueue.add:(Ljava/lang/Object;)Z
pop
end local 1 15: goto 0
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 16 0 this Lorg/apache/cassandra/utils/memory/SlabAllocator;
1 15 1 region Lorg/apache/cassandra/utils/memory/SlabAllocator$Region;
protected org.apache.cassandra.utils.memory.AbstractAllocator allocator(org.apache.cassandra.utils.concurrent.OpOrder$Group);
descriptor: (Lorg/apache/cassandra/utils/concurrent/OpOrder$Group;)Lorg/apache/cassandra/utils/memory/AbstractAllocator;
flags: (0x0004) ACC_PROTECTED
Code:
stack=4, locals=2, args_size=2
start local 0 start local 1 0: new org.apache.cassandra.utils.memory.ContextAllocator
dup
aload 1
aload 0
invokespecial org.apache.cassandra.utils.memory.ContextAllocator.<init>:(Lorg/apache/cassandra/utils/concurrent/OpOrder$Group;Lorg/apache/cassandra/utils/memory/MemtableBufferAllocator;)V
areturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lorg/apache/cassandra/utils/memory/SlabAllocator;
0 1 1 writeOp Lorg/apache/cassandra/utils/concurrent/OpOrder$Group;
MethodParameters:
Name Flags
writeOp
}
SourceFile: "SlabAllocator.java"
NestMembers:
org.apache.cassandra.utils.memory.SlabAllocator$Region
InnerClasses:
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
NoOp = org.apache.cassandra.utils.memory.EnsureOnHeap$NoOp of org.apache.cassandra.utils.memory.EnsureOnHeap
public final SubAllocator = org.apache.cassandra.utils.memory.MemtableAllocator$SubAllocator of org.apache.cassandra.utils.memory.MemtableAllocator
private Region = org.apache.cassandra.utils.memory.SlabAllocator$Region of org.apache.cassandra.utils.memory.SlabAllocator