class org.apache.cassandra.utils.memory.SlabAllocator$Region
minor version: 0
major version: 59
flags: flags: (0x0020) ACC_SUPER
this_class: org.apache.cassandra.utils.memory.SlabAllocator$Region
super_class: java.lang.Object
{
private final java.nio.ByteBuffer data;
descriptor: Ljava/nio/ByteBuffer;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
private final java.util.concurrent.atomic.AtomicInteger nextFreeOffset;
descriptor: Ljava/util/concurrent/atomic/AtomicInteger;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
private final java.util.concurrent.atomic.AtomicInteger allocCount;
descriptor: Ljava/util/concurrent/atomic/AtomicInteger;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
private void <init>(java.nio.ByteBuffer);
descriptor: (Ljava/nio/ByteBuffer;)V
flags: (0x0002) ACC_PRIVATE
Code:
stack=4, locals=2, args_size=2
start local 0 // org.apache.cassandra.utils.memory.SlabAllocator$Region this
start local 1 // java.nio.ByteBuffer buffer
0: .line 192
aload 0 /* this */
invokespecial java.lang.Object.<init>:()V
1: .line 179
aload 0 /* this */
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$Region.nextFreeOffset:Ljava/util/concurrent/atomic/AtomicInteger;
2: .line 184
aload 0 /* this */
new java.util.concurrent.atomic.AtomicInteger
dup
invokespecial java.util.concurrent.atomic.AtomicInteger.<init>:()V
putfield org.apache.cassandra.utils.memory.SlabAllocator$Region.allocCount:Ljava/util/concurrent/atomic/AtomicInteger;
3: .line 194
aload 0 /* this */
aload 1 /* buffer */
putfield org.apache.cassandra.utils.memory.SlabAllocator$Region.data:Ljava/nio/ByteBuffer;
4: .line 195
return
end local 1 // java.nio.ByteBuffer buffer
end local 0 // org.apache.cassandra.utils.memory.SlabAllocator$Region this
LocalVariableTable:
Start End Slot Name Signature
0 5 0 this Lorg/apache/cassandra/utils/memory/SlabAllocator$Region;
0 5 1 buffer Ljava/nio/ByteBuffer;
MethodParameters:
Name Flags
buffer
public java.nio.ByteBuffer allocate(int);
descriptor: (I)Ljava/nio/ByteBuffer;
flags: (0x0001) ACC_PUBLIC
Code:
stack=4, locals=3, args_size=2
start local 0 // org.apache.cassandra.utils.memory.SlabAllocator$Region this
start local 1 // int size
0: .line 206
StackMap locals:
StackMap stack:
aload 0 /* this */
getfield org.apache.cassandra.utils.memory.SlabAllocator$Region.nextFreeOffset:Ljava/util/concurrent/atomic/AtomicInteger;
invokevirtual java.util.concurrent.atomic.AtomicInteger.get:()I
istore 2 /* oldOffset */
start local 2 // int oldOffset
1: .line 208
iload 2 /* oldOffset */
iload 1 /* size */
iadd
aload 0 /* this */
getfield org.apache.cassandra.utils.memory.SlabAllocator$Region.data:Ljava/nio/ByteBuffer;
invokevirtual java.nio.ByteBuffer.capacity:()I
if_icmple 3
2: .line 209
aconst_null
areturn
3: .line 212
StackMap locals: int
StackMap stack:
aload 0 /* this */
getfield org.apache.cassandra.utils.memory.SlabAllocator$Region.nextFreeOffset:Ljava/util/concurrent/atomic/AtomicInteger;
iload 2 /* oldOffset */
iload 2 /* oldOffset */
iload 1 /* size */
iadd
invokevirtual java.util.concurrent.atomic.AtomicInteger.compareAndSet:(II)Z
ifeq 0
4: .line 215
aload 0 /* this */
getfield org.apache.cassandra.utils.memory.SlabAllocator$Region.allocCount:Ljava/util/concurrent/atomic/AtomicInteger;
invokevirtual java.util.concurrent.atomic.AtomicInteger.incrementAndGet:()I
pop
5: .line 216
aload 0 /* this */
getfield org.apache.cassandra.utils.memory.SlabAllocator$Region.data:Ljava/nio/ByteBuffer;
invokevirtual java.nio.ByteBuffer.duplicate:()Ljava/nio/ByteBuffer;
iload 2 /* oldOffset */
invokevirtual java.nio.ByteBuffer.position:(I)Ljava/nio/Buffer;
iload 2 /* oldOffset */
iload 1 /* size */
iadd
invokevirtual java.nio.Buffer.limit:(I)Ljava/nio/Buffer;
checkcast java.nio.ByteBuffer
areturn
end local 2 // int oldOffset
end local 1 // int size
end local 0 // org.apache.cassandra.utils.memory.SlabAllocator$Region this
LocalVariableTable:
Start End Slot Name Signature
0 6 0 this Lorg/apache/cassandra/utils/memory/SlabAllocator$Region;
0 6 1 size I
1 6 2 oldOffset I
MethodParameters:
Name Flags
size
public java.lang.String toString();
descriptor: ()Ljava/lang/String;
flags: (0x0001) ACC_PUBLIC
Code:
stack=3, locals=1, args_size=1
start local 0 // org.apache.cassandra.utils.memory.SlabAllocator$Region this
0: .line 225
new java.lang.StringBuilder
dup
ldc "Region@"
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
aload 0 /* this */
invokestatic java.lang.System.identityHashCode:(Ljava/lang/Object;)I
invokevirtual java.lang.StringBuilder.append:(I)Ljava/lang/StringBuilder;
1: .line 226
ldc " allocs="
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
aload 0 /* this */
getfield org.apache.cassandra.utils.memory.SlabAllocator$Region.allocCount:Ljava/util/concurrent/atomic/AtomicInteger;
invokevirtual java.util.concurrent.atomic.AtomicInteger.get:()I
invokevirtual java.lang.StringBuilder.append:(I)Ljava/lang/StringBuilder;
ldc "waste="
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
2: .line 227
aload 0 /* this */
getfield org.apache.cassandra.utils.memory.SlabAllocator$Region.data:Ljava/nio/ByteBuffer;
invokevirtual java.nio.ByteBuffer.capacity:()I
aload 0 /* this */
getfield org.apache.cassandra.utils.memory.SlabAllocator$Region.nextFreeOffset:Ljava/util/concurrent/atomic/AtomicInteger;
invokevirtual java.util.concurrent.atomic.AtomicInteger.get:()I
isub
invokevirtual java.lang.StringBuilder.append:(I)Ljava/lang/StringBuilder;
3: .line 225
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
areturn
end local 0 // org.apache.cassandra.utils.memory.SlabAllocator$Region this
LocalVariableTable:
Start End Slot Name Signature
0 4 0 this Lorg/apache/cassandra/utils/memory/SlabAllocator$Region;
}
SourceFile: "SlabAllocator.java"
NestHost: org.apache.cassandra.utils.memory.SlabAllocator
InnerClasses:
private Region = org.apache.cassandra.utils.memory.SlabAllocator$Region of org.apache.cassandra.utils.memory.SlabAllocator