final class org.apache.cassandra.utils.memory.BufferPool$GlobalPool
  minor version: 0
  major version: 59
  flags: flags: (0x0030) ACC_FINAL, ACC_SUPER
  this_class: org.apache.cassandra.utils.memory.BufferPool$GlobalPool
  super_class: java.lang.Object
{
  static final int MACRO_CHUNK_SIZE;
    descriptor: I
    flags: (0x0018) ACC_STATIC, ACC_FINAL
    ConstantValue: 1048576

  private final org.apache.cassandra.utils.memory.BufferPool$Debug debug;
    descriptor: Lorg/apache/cassandra/utils/memory/BufferPool$Debug;
    flags: (0x0012) ACC_PRIVATE, ACC_FINAL

  private final java.util.Queue<org.apache.cassandra.utils.memory.BufferPool$Chunk> macroChunks;
    descriptor: Ljava/util/Queue;
    flags: (0x0012) ACC_PRIVATE, ACC_FINAL
    Signature: Ljava/util/Queue<Lorg/apache/cassandra/utils/memory/BufferPool$Chunk;>;

  private final java.util.Queue<org.apache.cassandra.utils.memory.BufferPool$Chunk> chunks;
    descriptor: Ljava/util/Queue;
    flags: (0x0012) ACC_PRIVATE, ACC_FINAL
    Signature: Ljava/util/Queue<Lorg/apache/cassandra/utils/memory/BufferPool$Chunk;>;

  private final java.util.concurrent.atomic.AtomicLong memoryUsage;
    descriptor: Ljava/util/concurrent/atomic/AtomicLong;
    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=0, args_size=0
         0: .line 220
            ldc Lorg/apache/cassandra/utils/memory/BufferPool;
            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.BufferPool$GlobalPool.$assertionsDisabled:Z
         3: .line 227
            getstatic org.apache.cassandra.utils.memory.BufferPool$GlobalPool.$assertionsDisabled:Z
            ifne 4
            ldc 65536
            invokestatic java.lang.Integer.bitCount:(I)I
            iconst_1
            if_icmpeq 4
            new java.lang.AssertionError
            dup
            invokespecial java.lang.AssertionError.<init>:()V
            athrow
         4: .line 228
      StackMap locals:
      StackMap stack:
            getstatic org.apache.cassandra.utils.memory.BufferPool$GlobalPool.$assertionsDisabled:Z
            ifne 5
            ldc 1048576
            invokestatic java.lang.Integer.bitCount:(I)I
            iconst_1
            if_icmpeq 5
            new java.lang.AssertionError
            dup
            invokespecial java.lang.AssertionError.<init>:()V
            athrow
         5: .line 231
      StackMap locals:
      StackMap stack:
            getstatic org.apache.cassandra.utils.memory.BufferPool.DISABLED:Z
            ifeq 9
         6: .line 232
            getstatic org.apache.cassandra.utils.memory.BufferPool.logger:Lorg/slf4j/Logger;
            ldc "Global buffer pool is disabled, allocating {}"
            getstatic org.apache.cassandra.utils.memory.BufferPool.ALLOCATE_ON_HEAP_WHEN_EXAHUSTED:Z
            ifeq 7
            ldc "on heap"
            goto 8
      StackMap locals:
      StackMap stack: org.slf4j.Logger java.lang.String
         7: ldc "off heap"
      StackMap locals:
      StackMap stack: org.slf4j.Logger java.lang.String java.lang.String
         8: invokeinterface org.slf4j.Logger.info:(Ljava/lang/String;Ljava/lang/Object;)V
            goto 14
         9: .line 234
      StackMap locals:
      StackMap stack:
            getstatic org.apache.cassandra.utils.memory.BufferPool.logger:Lorg/slf4j/Logger;
            ldc "Global buffer pool is enabled, when pool is exhausted (max is {}) it will allocate {}"
        10: .line 235
            getstatic org.apache.cassandra.utils.memory.BufferPool.MEMORY_USAGE_THRESHOLD:J
            invokestatic org.apache.cassandra.utils.FBUtilities.prettyPrintMemory:(J)Ljava/lang/String;
        11: .line 236
            getstatic org.apache.cassandra.utils.memory.BufferPool.ALLOCATE_ON_HEAP_WHEN_EXAHUSTED:Z
            ifeq 12
            ldc "on heap"
            goto 13
      StackMap locals:
      StackMap stack: org.slf4j.Logger java.lang.String java.lang.String
        12: ldc "off heap"
        13: .line 234
      StackMap locals:
      StackMap stack: org.slf4j.Logger java.lang.String java.lang.String java.lang.String
            invokeinterface org.slf4j.Logger.info:(Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;)V
        14: .line 237
      StackMap locals:
      StackMap stack:
            return
      LocalVariableTable:
        Start  End  Slot  Name  Signature

  void <init>();
    descriptor: ()V
    flags: (0x0000) 
    Code:
      stack=3, locals=1, args_size=1
        start local 0 // org.apache.cassandra.utils.memory.BufferPool$GlobalPool this
         0: .line 220
            aload 0 /* this */
            invokespecial java.lang.Object.<init>:()V
         1: .line 239
            aload 0 /* this */
            new org.apache.cassandra.utils.memory.BufferPool$Debug
            dup
            invokespecial org.apache.cassandra.utils.memory.BufferPool$Debug.<init>:()V
            putfield org.apache.cassandra.utils.memory.BufferPool$GlobalPool.debug:Lorg/apache/cassandra/utils/memory/BufferPool$Debug;
         2: .line 240
            aload 0 /* this */
            new java.util.concurrent.ConcurrentLinkedQueue
            dup
            invokespecial java.util.concurrent.ConcurrentLinkedQueue.<init>:()V
            putfield org.apache.cassandra.utils.memory.BufferPool$GlobalPool.macroChunks:Ljava/util/Queue;
         3: .line 242
            aload 0 /* this */
            new java.util.concurrent.ConcurrentLinkedQueue
            dup
            invokespecial java.util.concurrent.ConcurrentLinkedQueue.<init>:()V
            putfield org.apache.cassandra.utils.memory.BufferPool$GlobalPool.chunks:Ljava/util/Queue;
         4: .line 243
            aload 0 /* this */
            new java.util.concurrent.atomic.AtomicLong
            dup
            invokespecial java.util.concurrent.atomic.AtomicLong.<init>:()V
            putfield org.apache.cassandra.utils.memory.BufferPool$GlobalPool.memoryUsage:Ljava/util/concurrent/atomic/AtomicLong;
         5: .line 220
            return
        end local 0 // org.apache.cassandra.utils.memory.BufferPool$GlobalPool this
      LocalVariableTable:
        Start  End  Slot  Name  Signature
            0    6     0  this  Lorg/apache/cassandra/utils/memory/BufferPool$GlobalPool;

  public org.apache.cassandra.utils.memory.BufferPool$Chunk get();
    descriptor: ()Lorg/apache/cassandra/utils/memory/BufferPool$Chunk;
    flags: (0x0001) ACC_PUBLIC
    Code:
      stack=1, locals=2, args_size=1
        start local 0 // org.apache.cassandra.utils.memory.BufferPool$GlobalPool this
         0: .line 250
      StackMap locals:
      StackMap stack:
            aload 0 /* this */
            getfield org.apache.cassandra.utils.memory.BufferPool$GlobalPool.chunks:Ljava/util/Queue;
            invokeinterface java.util.Queue.poll:()Ljava/lang/Object;
            checkcast org.apache.cassandra.utils.memory.BufferPool$Chunk
            astore 1 /* chunk */
        start local 1 // org.apache.cassandra.utils.memory.BufferPool$Chunk chunk
         1: .line 251
            aload 1 /* chunk */
            ifnull 3
         2: .line 252
            aload 1 /* chunk */
            areturn
         3: .line 254
      StackMap locals: org.apache.cassandra.utils.memory.BufferPool$Chunk
      StackMap stack:
            aload 0 /* this */
            invokevirtual org.apache.cassandra.utils.memory.BufferPool$GlobalPool.allocateMoreChunks:()Z
            ifne 0
         4: .line 256
            aload 0 /* this */
            getfield org.apache.cassandra.utils.memory.BufferPool$GlobalPool.chunks:Ljava/util/Queue;
            invokeinterface java.util.Queue.poll:()Ljava/lang/Object;
            checkcast org.apache.cassandra.utils.memory.BufferPool$Chunk
            areturn
        end local 1 // org.apache.cassandra.utils.memory.BufferPool$Chunk chunk
        end local 0 // org.apache.cassandra.utils.memory.BufferPool$GlobalPool this
      LocalVariableTable:
        Start  End  Slot   Name  Signature
            0    5     0   this  Lorg/apache/cassandra/utils/memory/BufferPool$GlobalPool;
            1    5     1  chunk  Lorg/apache/cassandra/utils/memory/BufferPool$Chunk;

  private boolean allocateMoreChunks();
    descriptor: ()Z
    flags: (0x0002) ACC_PRIVATE
    Code:
      stack=7, locals=4, args_size=1
        start local 0 // org.apache.cassandra.utils.memory.BufferPool$GlobalPool this
         0: .line 268
      StackMap locals:
      StackMap stack:
            aload 0 /* this */
            getfield org.apache.cassandra.utils.memory.BufferPool$GlobalPool.memoryUsage:Ljava/util/concurrent/atomic/AtomicLong;
            invokevirtual java.util.concurrent.atomic.AtomicLong.get:()J
            lstore 1 /* cur */
        start local 1 // long cur
         1: .line 269
            lload 1 /* cur */
            ldc 1048576
            ladd
            getstatic org.apache.cassandra.utils.memory.BufferPool.MEMORY_USAGE_THRESHOLD:J
            lcmp
            ifle 6
         2: .line 271
            getstatic org.apache.cassandra.utils.memory.BufferPool.noSpamLogger:Lorg/apache/cassandra/utils/NoSpamLogger;
            ldc "Maximum memory usage reached ({}), cannot allocate chunk of {}"
            iconst_2
            anewarray java.lang.Object
            dup
            iconst_0
         3: .line 272
            getstatic org.apache.cassandra.utils.memory.BufferPool.MEMORY_USAGE_THRESHOLD:J
            invokestatic java.lang.Long.valueOf:(J)Ljava/lang/Long;
            aastore
            dup
            iconst_1
            ldc 1048576
            invokestatic java.lang.Integer.valueOf:(I)Ljava/lang/Integer;
            aastore
         4: .line 271
            invokevirtual org.apache.cassandra.utils.NoSpamLogger.info:(Ljava/lang/String;[Ljava/lang/Object;)Z
            pop
         5: .line 273
            iconst_0
            ireturn
         6: .line 275
      StackMap locals: long
      StackMap stack:
            aload 0 /* this */
            getfield org.apache.cassandra.utils.memory.BufferPool$GlobalPool.memoryUsage:Ljava/util/concurrent/atomic/AtomicLong;
            lload 1 /* cur */
            lload 1 /* cur */
            ldc 1048576
            ladd
            invokevirtual java.util.concurrent.atomic.AtomicLong.compareAndSet:(JJ)Z
            ifeq 0
        end local 1 // long cur
         7: .line 283
            new org.apache.cassandra.utils.memory.BufferPool$Chunk
            dup
            ldc 1048576
            invokestatic org.apache.cassandra.utils.memory.BufferPool.allocateDirectAligned:(I)Ljava/nio/ByteBuffer;
            invokespecial org.apache.cassandra.utils.memory.BufferPool$Chunk.<init>:(Ljava/nio/ByteBuffer;)V
            astore 1 /* chunk */
        start local 1 // org.apache.cassandra.utils.memory.BufferPool$Chunk chunk
         8: .line 284
            goto 14
        end local 1 // org.apache.cassandra.utils.memory.BufferPool$Chunk chunk
         9: .line 285
      StackMap locals: org.apache.cassandra.utils.memory.BufferPool$GlobalPool
      StackMap stack: java.lang.OutOfMemoryError
            astore 2 /* oom */
        start local 2 // java.lang.OutOfMemoryError oom
        10: .line 287
            getstatic org.apache.cassandra.utils.memory.BufferPool.noSpamLogger:Lorg/apache/cassandra/utils/NoSpamLogger;
            ldc "Buffer pool failed to allocate chunk of {}, current size {} ({}). Attempting to continue; buffers will be allocated in on-heap memory which can degrade performance. Make sure direct memory size (-XX:MaxDirectMemorySize) is large enough to accommodate off-heap memtables and caches."
            iconst_3
            anewarray java.lang.Object
            dup
            iconst_0
        11: .line 290
            ldc 1048576
            invokestatic java.lang.Integer.valueOf:(I)Ljava/lang/Integer;
            aastore
            dup
            iconst_1
            aload 0 /* this */
            invokevirtual org.apache.cassandra.utils.memory.BufferPool$GlobalPool.sizeInBytes:()J
            invokestatic java.lang.Long.valueOf:(J)Ljava/lang/Long;
            aastore
            dup
            iconst_2
            aload 2 /* oom */
            invokevirtual java.lang.OutOfMemoryError.toString:()Ljava/lang/String;
            aastore
        12: .line 287
            invokevirtual org.apache.cassandra.utils.NoSpamLogger.error:(Ljava/lang/String;[Ljava/lang/Object;)Z
            pop
        13: .line 291
            iconst_0
            ireturn
        end local 2 // java.lang.OutOfMemoryError oom
        start local 1 // org.apache.cassandra.utils.memory.BufferPool$Chunk chunk
        14: .line 294
      StackMap locals: org.apache.cassandra.utils.memory.BufferPool$Chunk
      StackMap stack:
            aload 1 /* chunk */
            aconst_null
            invokevirtual org.apache.cassandra.utils.memory.BufferPool$Chunk.acquire:(Lorg/apache/cassandra/utils/memory/BufferPool$LocalPool;)V
        15: .line 295
            aload 0 /* this */
            getfield org.apache.cassandra.utils.memory.BufferPool$GlobalPool.macroChunks:Ljava/util/Queue;
            aload 1 /* chunk */
            invokeinterface java.util.Queue.add:(Ljava/lang/Object;)Z
            pop
        16: .line 296
            iconst_0
            istore 2 /* i */
        start local 2 // int i
        17: goto 23
        18: .line 298
      StackMap locals: int
      StackMap stack:
            new org.apache.cassandra.utils.memory.BufferPool$Chunk
            dup
            aload 1 /* chunk */
            ldc 65536
            invokevirtual org.apache.cassandra.utils.memory.BufferPool$Chunk.get:(I)Ljava/nio/ByteBuffer;
            invokespecial org.apache.cassandra.utils.memory.BufferPool$Chunk.<init>:(Ljava/nio/ByteBuffer;)V
            astore 3 /* add */
        start local 3 // org.apache.cassandra.utils.memory.BufferPool$Chunk add
        19: .line 299
            aload 0 /* this */
            getfield org.apache.cassandra.utils.memory.BufferPool$GlobalPool.chunks:Ljava/util/Queue;
            aload 3 /* add */
            invokeinterface java.util.Queue.add:(Ljava/lang/Object;)Z
            pop
        20: .line 300
            getstatic org.apache.cassandra.utils.memory.BufferPool.DEBUG:Z
            ifeq 22
        21: .line 301
            aload 0 /* this */
            getfield org.apache.cassandra.utils.memory.BufferPool$GlobalPool.debug:Lorg/apache/cassandra/utils/memory/BufferPool$Debug;
            aload 3 /* add */
            invokevirtual org.apache.cassandra.utils.memory.BufferPool$Debug.register:(Lorg/apache/cassandra/utils/memory/BufferPool$Chunk;)V
        end local 3 // org.apache.cassandra.utils.memory.BufferPool$Chunk add
        22: .line 296
      StackMap locals:
      StackMap stack:
            iload 2 /* i */
            ldc 65536
            iadd
            istore 2 /* i */
      StackMap locals:
      StackMap stack:
        23: iload 2 /* i */
            ldc 1048576
            if_icmplt 18
        end local 2 // int i
        24: .line 304
            iconst_1
            ireturn
        end local 1 // org.apache.cassandra.utils.memory.BufferPool$Chunk chunk
        end local 0 // org.apache.cassandra.utils.memory.BufferPool$GlobalPool this
      LocalVariableTable:
        Start  End  Slot   Name  Signature
            0   25     0   this  Lorg/apache/cassandra/utils/memory/BufferPool$GlobalPool;
            1    7     1    cur  J
            8    9     1  chunk  Lorg/apache/cassandra/utils/memory/BufferPool$Chunk;
           14   25     1  chunk  Lorg/apache/cassandra/utils/memory/BufferPool$Chunk;
           10   14     2    oom  Ljava/lang/OutOfMemoryError;
           17   24     2      i  I
           19   22     3    add  Lorg/apache/cassandra/utils/memory/BufferPool$Chunk;
      Exception table:
        from    to  target  type
           7     8       9  Class java.lang.OutOfMemoryError

  public void recycle(org.apache.cassandra.utils.memory.BufferPool$Chunk);
    descriptor: (Lorg/apache/cassandra/utils/memory/BufferPool$Chunk;)V
    flags: (0x0001) ACC_PUBLIC
    Code:
      stack=2, locals=2, args_size=2
        start local 0 // org.apache.cassandra.utils.memory.BufferPool$GlobalPool this
        start local 1 // org.apache.cassandra.utils.memory.BufferPool$Chunk chunk
         0: .line 309
            aload 0 /* this */
            getfield org.apache.cassandra.utils.memory.BufferPool$GlobalPool.chunks:Ljava/util/Queue;
            aload 1 /* chunk */
            invokeinterface java.util.Queue.add:(Ljava/lang/Object;)Z
            pop
         1: .line 310
            return
        end local 1 // org.apache.cassandra.utils.memory.BufferPool$Chunk chunk
        end local 0 // org.apache.cassandra.utils.memory.BufferPool$GlobalPool this
      LocalVariableTable:
        Start  End  Slot   Name  Signature
            0    2     0   this  Lorg/apache/cassandra/utils/memory/BufferPool$GlobalPool;
            0    2     1  chunk  Lorg/apache/cassandra/utils/memory/BufferPool$Chunk;
    MethodParameters:
       Name  Flags
      chunk  

  public long sizeInBytes();
    descriptor: ()J
    flags: (0x0001) ACC_PUBLIC
    Code:
      stack=2, locals=1, args_size=1
        start local 0 // org.apache.cassandra.utils.memory.BufferPool$GlobalPool this
         0: .line 314
            aload 0 /* this */
            getfield org.apache.cassandra.utils.memory.BufferPool$GlobalPool.memoryUsage:Ljava/util/concurrent/atomic/AtomicLong;
            invokevirtual java.util.concurrent.atomic.AtomicLong.get:()J
            lreturn
        end local 0 // org.apache.cassandra.utils.memory.BufferPool$GlobalPool this
      LocalVariableTable:
        Start  End  Slot  Name  Signature
            0    1     0  this  Lorg/apache/cassandra/utils/memory/BufferPool$GlobalPool;

  void reset();
    descriptor: ()V
    flags: (0x0000) 
    Code:
      stack=3, locals=1, args_size=1
        start local 0 // org.apache.cassandra.utils.memory.BufferPool$GlobalPool this
         0: .line 321
            goto 2
         1: .line 322
      StackMap locals:
      StackMap stack:
            aload 0 /* this */
            getfield org.apache.cassandra.utils.memory.BufferPool$GlobalPool.chunks:Ljava/util/Queue;
            invokeinterface java.util.Queue.poll:()Ljava/lang/Object;
            checkcast org.apache.cassandra.utils.memory.BufferPool$Chunk
            invokevirtual org.apache.cassandra.utils.memory.BufferPool$Chunk.reset:()V
         2: .line 321
      StackMap locals:
      StackMap stack:
            aload 0 /* this */
            getfield org.apache.cassandra.utils.memory.BufferPool$GlobalPool.chunks:Ljava/util/Queue;
            invokeinterface java.util.Queue.isEmpty:()Z
            ifeq 1
         3: .line 324
            goto 5
         4: .line 325
      StackMap locals:
      StackMap stack:
            aload 0 /* this */
            getfield org.apache.cassandra.utils.memory.BufferPool$GlobalPool.macroChunks:Ljava/util/Queue;
            invokeinterface java.util.Queue.poll:()Ljava/lang/Object;
            checkcast org.apache.cassandra.utils.memory.BufferPool$Chunk
            invokevirtual org.apache.cassandra.utils.memory.BufferPool$Chunk.reset:()V
         5: .line 324
      StackMap locals:
      StackMap stack:
            aload 0 /* this */
            getfield org.apache.cassandra.utils.memory.BufferPool$GlobalPool.macroChunks:Ljava/util/Queue;
            invokeinterface java.util.Queue.isEmpty:()Z
            ifeq 4
         6: .line 327
            aload 0 /* this */
            getfield org.apache.cassandra.utils.memory.BufferPool$GlobalPool.memoryUsage:Ljava/util/concurrent/atomic/AtomicLong;
            lconst_0
            invokevirtual java.util.concurrent.atomic.AtomicLong.set:(J)V
         7: .line 328
            return
        end local 0 // org.apache.cassandra.utils.memory.BufferPool$GlobalPool this
      LocalVariableTable:
        Start  End  Slot  Name  Signature
            0    8     0  this  Lorg/apache/cassandra/utils/memory/BufferPool$GlobalPool;
    RuntimeInvisibleAnnotations: 
      com.google.common.annotations.VisibleForTesting()
}
SourceFile: "BufferPool.java"
NestHost: org.apache.cassandra.utils.memory.BufferPool
InnerClasses:
  final Chunk = org.apache.cassandra.utils.memory.BufferPool$Chunk of org.apache.cassandra.utils.memory.BufferPool
  final Debug = org.apache.cassandra.utils.memory.BufferPool$Debug of org.apache.cassandra.utils.memory.BufferPool
  final GlobalPool = org.apache.cassandra.utils.memory.BufferPool$GlobalPool of org.apache.cassandra.utils.memory.BufferPool
  final LocalPool = org.apache.cassandra.utils.memory.BufferPool$LocalPool of org.apache.cassandra.utils.memory.BufferPool