public class org.glassfish.grizzly.memory.PooledMemoryManager implements org.glassfish.grizzly.memory.MemoryManager<org.glassfish.grizzly.Buffer>, org.glassfish.grizzly.memory.WrapperAware
minor version: 0
major version: 59
flags: flags: (0x0021) ACC_PUBLIC, ACC_SUPER
this_class: org.glassfish.grizzly.memory.PooledMemoryManager
super_class: java.lang.Object
{
public static final int DEFAULT_BASE_BUFFER_SIZE;
descriptor: I
flags: (0x0019) ACC_PUBLIC, ACC_STATIC, ACC_FINAL
ConstantValue: 4096
public static final int DEFAULT_NUMBER_OF_POOLS;
descriptor: I
flags: (0x0019) ACC_PUBLIC, ACC_STATIC, ACC_FINAL
ConstantValue: 3
public static final int DEFAULT_GROWTH_FACTOR;
descriptor: I
flags: (0x0019) ACC_PUBLIC, ACC_STATIC, ACC_FINAL
ConstantValue: 2
public static final float DEFAULT_HEAP_USAGE_PERCENTAGE;
descriptor: F
flags: (0x0019) ACC_PUBLIC, ACC_STATIC, ACC_FINAL
ConstantValue: 0.03
public static final float DEFAULT_PREALLOCATED_BUFFERS_PERCENTAGE;
descriptor: F
flags: (0x0019) ACC_PUBLIC, ACC_STATIC, ACC_FINAL
ConstantValue: 1.0
private static final boolean FORCE_BYTE_BUFFER_BASED_BUFFERS;
descriptor: Z
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
private static final long BACK_OFF_DELAY;
descriptor: J
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
protected final org.glassfish.grizzly.monitoring.DefaultMonitoringConfig<org.glassfish.grizzly.memory.MemoryProbe> monitoringConfig;
descriptor: Lorg/glassfish/grizzly/monitoring/DefaultMonitoringConfig;
flags: (0x0014) ACC_PROTECTED, ACC_FINAL
Signature: Lorg/glassfish/grizzly/monitoring/DefaultMonitoringConfig<Lorg/glassfish/grizzly/memory/MemoryProbe;>;
private final org.glassfish.grizzly.memory.PooledMemoryManager$Pool[] pools;
descriptor: [Lorg/glassfish/grizzly/memory/PooledMemoryManager$Pool;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
private final int maxPooledBufferSize;
descriptor: I
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=3, locals=0, args_size=0
0: ldc Lorg/glassfish/grizzly/memory/PooledMemoryManager;
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.glassfish.grizzly.memory.PooledMemoryManager.$assertionsDisabled:Z
3: new java.lang.StringBuilder
dup
invokespecial java.lang.StringBuilder.<init>:()V
ldc Lorg/glassfish/grizzly/memory/PooledMemoryManager;
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/Object;)Ljava/lang/StringBuilder;
ldc ".force-byte-buffer-based-buffers"
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
invokestatic java.lang.Boolean.getBoolean:(Ljava/lang/String;)Z
putstatic org.glassfish.grizzly.memory.PooledMemoryManager.FORCE_BYTE_BUFFER_BASED_BUFFERS:Z
4: new java.lang.StringBuilder
dup
invokespecial java.lang.StringBuilder.<init>:()V
ldc Lorg/glassfish/grizzly/memory/PooledMemoryManager;
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/Object;)Ljava/lang/StringBuilder;
ldc ".back-off-delay"
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
lconst_0
invokestatic java.lang.Long.getLong:(Ljava/lang/String;J)Ljava/lang/Long;
invokevirtual java.lang.Long.longValue:()J
putstatic org.glassfish.grizzly.memory.PooledMemoryManager.BACK_OFF_DELAY:J
return
LocalVariableTable:
Start End Slot Name Signature
public void <init>();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
Code:
stack=8, locals=1, args_size=1
start local 0 0: aload 0
sipush 4096
iconst_3
iconst_2
invokestatic java.lang.Runtime.getRuntime:()Ljava/lang/Runtime;
invokevirtual java.lang.Runtime.availableProcessors:()I
1: ldc 0.03
fconst_1
iconst_0
invokespecial org.glassfish.grizzly.memory.PooledMemoryManager.<init>:(IIIIFFZ)V
2: return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 3 0 this Lorg/glassfish/grizzly/memory/PooledMemoryManager;
public void <init>(boolean);
descriptor: (Z)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=8, locals=2, args_size=2
start local 0 start local 1 0: aload 0
sipush 4096
iconst_3
iconst_2
invokestatic java.lang.Runtime.getRuntime:()Ljava/lang/Runtime;
invokevirtual java.lang.Runtime.availableProcessors:()I
1: ldc 0.03
fconst_1
iload 1
invokespecial org.glassfish.grizzly.memory.PooledMemoryManager.<init>:(IIIIFFZ)V
2: return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 3 0 this Lorg/glassfish/grizzly/memory/PooledMemoryManager;
0 3 1 isDirect Z
MethodParameters:
Name Flags
isDirect final
public void <init>(int, int, int, int, float, float, boolean);
descriptor: (IIIIFFZ)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=11, locals=14, args_size=8
start local 0 start local 1 start local 2 start local 3 start local 4 start local 5 start local 6 start local 7 0: aload 0
invokespecial java.lang.Object.<init>:()V
1: aload 0
new org.glassfish.grizzly.memory.PooledMemoryManager$1
dup
aload 0
ldc Lorg/glassfish/grizzly/memory/MemoryProbe;
invokespecial org.glassfish.grizzly.memory.PooledMemoryManager$1.<init>:(Lorg/glassfish/grizzly/memory/PooledMemoryManager;Ljava/lang/Class;)V
putfield org.glassfish.grizzly.memory.PooledMemoryManager.monitoringConfig:Lorg/glassfish/grizzly/monitoring/DefaultMonitoringConfig;
2: iload 1
ifgt 4
3: new java.lang.IllegalArgumentException
dup
ldc "baseBufferSize must be greater than zero"
invokespecial java.lang.IllegalArgumentException.<init>:(Ljava/lang/String;)V
athrow
4: StackMap locals: org.glassfish.grizzly.memory.PooledMemoryManager int int int int float float int
StackMap stack:
iload 2
ifgt 6
5: new java.lang.IllegalArgumentException
dup
ldc "numberOfPools must be greater than zero"
invokespecial java.lang.IllegalArgumentException.<init>:(Ljava/lang/String;)V
athrow
6: StackMap locals:
StackMap stack:
iload 3
ifne 8
iload 2
iconst_1
if_icmple 8
7: new java.lang.IllegalArgumentException
dup
ldc "if numberOfPools is greater than 0 - growthFactor must be greater than zero"
invokespecial java.lang.IllegalArgumentException.<init>:(Ljava/lang/String;)V
athrow
8: StackMap locals:
StackMap stack:
iload 3
ifge 10
9: new java.lang.IllegalArgumentException
dup
ldc "growthFactor must be greater or equal to zero"
invokespecial java.lang.IllegalArgumentException.<init>:(Ljava/lang/String;)V
athrow
10: StackMap locals:
StackMap stack:
iload 4
ifgt 12
11: new java.lang.IllegalArgumentException
dup
ldc "numberOfPoolSlices must be greater than zero"
invokespecial java.lang.IllegalArgumentException.<init>:(Ljava/lang/String;)V
athrow
12: StackMap locals:
StackMap stack:
iload 1
invokestatic org.glassfish.grizzly.memory.PooledMemoryManager.isPowerOfTwo:(I)Z
ifeq 13
iload 3
invokestatic org.glassfish.grizzly.memory.PooledMemoryManager.isPowerOfTwo:(I)Z
ifne 14
13: StackMap locals:
StackMap stack:
new java.lang.IllegalArgumentException
dup
ldc "minBufferSize and growthFactor must be a power of two"
invokespecial java.lang.IllegalArgumentException.<init>:(Ljava/lang/String;)V
athrow
14: StackMap locals:
StackMap stack:
fload 5
fconst_0
fcmpg
ifle 15
fload 5
fconst_1
fcmpl
iflt 16
15: StackMap locals:
StackMap stack:
new java.lang.IllegalArgumentException
dup
ldc "percentOfHeap must be greater than zero and less than 1"
invokespecial java.lang.IllegalArgumentException.<init>:(Ljava/lang/String;)V
athrow
16: StackMap locals:
StackMap stack:
fload 6
fconst_0
fcmpg
iflt 17
fload 6
fconst_1
fcmpl
ifle 18
17: StackMap locals:
StackMap stack:
new java.lang.IllegalArgumentException
dup
ldc "percentPreallocated must be greater or equal to zero and less or equal to 1"
invokespecial java.lang.IllegalArgumentException.<init>:(Ljava/lang/String;)V
athrow
18: StackMap locals:
StackMap stack:
invokestatic java.lang.Runtime.getRuntime:()Ljava/lang/Runtime;
invokevirtual java.lang.Runtime.maxMemory:()J
lstore 8
start local 8 19: lload 8
l2f
fload 5
fmul
iload 2
i2f
fdiv
f2l
lstore 10
start local 10 20: aload 0
iload 2
anewarray org.glassfish.grizzly.memory.PooledMemoryManager$Pool
putfield org.glassfish.grizzly.memory.PooledMemoryManager.pools:[Lorg/glassfish/grizzly/memory/PooledMemoryManager$Pool;
21: iconst_0
istore 12
start local 12 22: iload 1
istore 13
start local 13 23: goto 26
24: StackMap locals: org.glassfish.grizzly.memory.PooledMemoryManager int int int int float float int long long int int
StackMap stack:
aload 0
getfield org.glassfish.grizzly.memory.PooledMemoryManager.pools:[Lorg/glassfish/grizzly/memory/PooledMemoryManager$Pool;
iload 12
new org.glassfish.grizzly.memory.PooledMemoryManager$Pool
dup
iload 13
lload 10
iload 4
fload 6
iload 7
aload 0
getfield org.glassfish.grizzly.memory.PooledMemoryManager.monitoringConfig:Lorg/glassfish/grizzly/monitoring/DefaultMonitoringConfig;
invokespecial org.glassfish.grizzly.memory.PooledMemoryManager$Pool.<init>:(IJIFZLorg/glassfish/grizzly/monitoring/DefaultMonitoringConfig;)V
aastore
25: iinc 12 1
iload 13
iload 3
ishl
istore 13
StackMap locals:
StackMap stack:
26: iload 12
iload 2
if_icmplt 24
end local 13 end local 12 27: aload 0
aload 0
getfield org.glassfish.grizzly.memory.PooledMemoryManager.pools:[Lorg/glassfish/grizzly/memory/PooledMemoryManager$Pool;
iload 2
iconst_1
isub
aaload
getfield org.glassfish.grizzly.memory.PooledMemoryManager$Pool.bufferSize:I
putfield org.glassfish.grizzly.memory.PooledMemoryManager.maxPooledBufferSize:I
28: return
end local 10 end local 8 end local 7 end local 6 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 29 0 this Lorg/glassfish/grizzly/memory/PooledMemoryManager;
0 29 1 baseBufferSize I
0 29 2 numberOfPools I
0 29 3 growthFactor I
0 29 4 numberOfPoolSlices I
0 29 5 percentOfHeap F
0 29 6 percentPreallocated F
0 29 7 isDirect Z
19 29 8 heapSize J
20 29 10 memoryPerSubPool J
22 27 12 i I
23 27 13 bufferSize I
MethodParameters:
Name Flags
baseBufferSize final
numberOfPools final
growthFactor final
numberOfPoolSlices final
percentOfHeap final
percentPreallocated final
isDirect final
public org.glassfish.grizzly.Buffer allocate(int);
descriptor: (I)Lorg/glassfish/grizzly/Buffer;
flags: (0x0001) ACC_PUBLIC
Code:
stack=3, locals=2, args_size=2
start local 0 start local 1 0: iload 1
ifge 2
1: new java.lang.IllegalArgumentException
dup
ldc "Requested allocation size must be greater than or equal to zero."
invokespecial java.lang.IllegalArgumentException.<init>:(Ljava/lang/String;)V
athrow
2: StackMap locals:
StackMap stack:
aload 0
iload 1
invokevirtual org.glassfish.grizzly.memory.PooledMemoryManager.allocateAtLeast:(I)Lorg/glassfish/grizzly/Buffer;
iload 1
invokeinterface org.glassfish.grizzly.Buffer.limit:(I)Lorg/glassfish/grizzly/Buffer;
areturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 3 0 this Lorg/glassfish/grizzly/memory/PooledMemoryManager;
0 3 1 size I
MethodParameters:
Name Flags
size final
public org.glassfish.grizzly.Buffer allocateAtLeast(int);
descriptor: (I)Lorg/glassfish/grizzly/Buffer;
flags: (0x0001) ACC_PUBLIC
Code:
stack=3, locals=2, args_size=2
start local 0 start local 1 0: iload 1
ifge 2
1: new java.lang.IllegalArgumentException
dup
ldc "Requested allocation size must be greater than or equal to zero."
invokespecial java.lang.IllegalArgumentException.<init>:(Ljava/lang/String;)V
athrow
2: StackMap locals:
StackMap stack:
iload 1
ifne 4
3: getstatic org.glassfish.grizzly.memory.Buffers.EMPTY_BUFFER:Lorg/glassfish/grizzly/Buffer;
areturn
4: StackMap locals:
StackMap stack:
iload 1
aload 0
getfield org.glassfish.grizzly.memory.PooledMemoryManager.maxPooledBufferSize:I
if_icmpgt 5
aload 0
iload 1
invokevirtual org.glassfish.grizzly.memory.PooledMemoryManager.getPoolFor:(I)Lorg/glassfish/grizzly/memory/PooledMemoryManager$Pool;
invokevirtual org.glassfish.grizzly.memory.PooledMemoryManager$Pool.allocate:()Lorg/glassfish/grizzly/Buffer;
goto 6
StackMap locals:
StackMap stack:
5: aload 0
aload 0
invokevirtual org.glassfish.grizzly.memory.PooledMemoryManager.newCompositeBuffer:()Lorg/glassfish/grizzly/memory/CompositeBuffer;
iload 1
invokevirtual org.glassfish.grizzly.memory.PooledMemoryManager.allocateToCompositeBuffer:(Lorg/glassfish/grizzly/memory/CompositeBuffer;I)Lorg/glassfish/grizzly/memory/CompositeBuffer;
StackMap locals:
StackMap stack: org.glassfish.grizzly.Buffer
6: areturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 7 0 this Lorg/glassfish/grizzly/memory/PooledMemoryManager;
0 7 1 size I
MethodParameters:
Name Flags
size
public org.glassfish.grizzly.Buffer reallocate(org.glassfish.grizzly.Buffer, int);
descriptor: (Lorg/glassfish/grizzly/Buffer;I)Lorg/glassfish/grizzly/Buffer;
flags: (0x0001) ACC_PUBLIC
Code:
stack=4, locals=8, args_size=3
start local 0 start local 1 start local 2 0: iload 2
ifne 3
1: aload 1
invokeinterface org.glassfish.grizzly.Buffer.tryDispose:()Z
pop
2: getstatic org.glassfish.grizzly.memory.Buffers.EMPTY_BUFFER:Lorg/glassfish/grizzly/Buffer;
areturn
3: StackMap locals:
StackMap stack:
aload 1
invokeinterface org.glassfish.grizzly.Buffer.capacity:()I
istore 3
start local 3 4: aload 1
instanceof org.glassfish.grizzly.memory.PooledMemoryManager$PoolBuffer
ifeq 31
5: iload 3
iload 2
if_icmplt 17
6: aload 1
checkcast org.glassfish.grizzly.memory.PooledMemoryManager$PoolBuffer
astore 4
start local 4 7: aload 0
iload 2
invokevirtual org.glassfish.grizzly.memory.PooledMemoryManager.getPoolFor:(I)Lorg/glassfish/grizzly/memory/PooledMemoryManager$Pool;
astore 5
start local 5 8: aload 5
aload 4
invokeinterface org.glassfish.grizzly.memory.PooledMemoryManager$PoolBuffer.owner:()Lorg/glassfish/grizzly/memory/PooledMemoryManager$PoolSlice;
getfield org.glassfish.grizzly.memory.PooledMemoryManager$PoolSlice.owner:Lorg/glassfish/grizzly/memory/PooledMemoryManager$Pool;
if_acmpeq 16
9: aload 4
invokeinterface org.glassfish.grizzly.memory.PooledMemoryManager$PoolBuffer.position:()I
iload 2
invokestatic java.lang.Math.min:(II)I
istore 6
start local 6 10: aload 5
invokevirtual org.glassfish.grizzly.memory.PooledMemoryManager$Pool.allocate:()Lorg/glassfish/grizzly/Buffer;
astore 7
start local 7 11: aload 4
iconst_0
iload 2
invokestatic org.glassfish.grizzly.memory.Buffers.setPositionLimit:(Lorg/glassfish/grizzly/Buffer;II)V
12: aload 7
aload 4
invokeinterface org.glassfish.grizzly.Buffer.put:(Lorg/glassfish/grizzly/Buffer;)Lorg/glassfish/grizzly/Buffer;
pop
13: aload 7
iload 6
iload 2
invokestatic org.glassfish.grizzly.memory.Buffers.setPositionLimit:(Lorg/glassfish/grizzly/Buffer;II)V
14: aload 4
invokeinterface org.glassfish.grizzly.memory.PooledMemoryManager$PoolBuffer.tryDispose:()Z
pop
15: aload 7
areturn
end local 7 end local 6 16: StackMap locals: int org.glassfish.grizzly.memory.PooledMemoryManager$PoolBuffer org.glassfish.grizzly.memory.PooledMemoryManager$Pool
StackMap stack:
aload 4
iload 2
invokeinterface org.glassfish.grizzly.memory.PooledMemoryManager$PoolBuffer.limit:(I)Lorg/glassfish/grizzly/Buffer;
areturn
end local 5 end local 4 17: StackMap locals:
StackMap stack:
aload 1
invokeinterface org.glassfish.grizzly.Buffer.position:()I
istore 4
start local 4 18: aload 1
iconst_0
iload 3
invokestatic org.glassfish.grizzly.memory.Buffers.setPositionLimit:(Lorg/glassfish/grizzly/Buffer;II)V
19: iload 2
aload 0
getfield org.glassfish.grizzly.memory.PooledMemoryManager.maxPooledBufferSize:I
if_icmpgt 26
20: aload 0
iload 2
invokevirtual org.glassfish.grizzly.memory.PooledMemoryManager.getPoolFor:(I)Lorg/glassfish/grizzly/memory/PooledMemoryManager$Pool;
astore 5
start local 5 21: aload 5
invokevirtual org.glassfish.grizzly.memory.PooledMemoryManager$Pool.allocate:()Lorg/glassfish/grizzly/Buffer;
astore 6
start local 6 22: aload 6
aload 1
invokeinterface org.glassfish.grizzly.Buffer.put:(Lorg/glassfish/grizzly/Buffer;)Lorg/glassfish/grizzly/Buffer;
pop
23: aload 6
iload 4
iload 2
invokestatic org.glassfish.grizzly.memory.Buffers.setPositionLimit:(Lorg/glassfish/grizzly/Buffer;II)V
24: aload 1
invokeinterface org.glassfish.grizzly.Buffer.tryDispose:()Z
pop
25: aload 6
areturn
end local 6 end local 5 26: StackMap locals: int
StackMap stack:
aload 0
invokevirtual org.glassfish.grizzly.memory.PooledMemoryManager.newCompositeBuffer:()Lorg/glassfish/grizzly/memory/CompositeBuffer;
astore 5
start local 5 27: aload 5
aload 1
invokevirtual org.glassfish.grizzly.memory.CompositeBuffer.append:(Lorg/glassfish/grizzly/Buffer;)Lorg/glassfish/grizzly/memory/CompositeBuffer;
pop
28: aload 0
aload 5
iload 2
iload 3
isub
invokevirtual org.glassfish.grizzly.memory.PooledMemoryManager.allocateToCompositeBuffer:(Lorg/glassfish/grizzly/memory/CompositeBuffer;I)Lorg/glassfish/grizzly/memory/CompositeBuffer;
pop
29: aload 5
iload 4
iload 2
invokestatic org.glassfish.grizzly.memory.Buffers.setPositionLimit:(Lorg/glassfish/grizzly/Buffer;II)V
30: aload 5
areturn
end local 5 end local 4 31: StackMap locals:
StackMap stack:
getstatic org.glassfish.grizzly.memory.PooledMemoryManager.$assertionsDisabled:Z
ifne 32
aload 1
invokeinterface org.glassfish.grizzly.Buffer.isComposite:()Z
ifne 32
new java.lang.AssertionError
dup
invokespecial java.lang.AssertionError.<init>:()V
athrow
32: StackMap locals:
StackMap stack:
aload 1
checkcast org.glassfish.grizzly.memory.CompositeBuffer
astore 4
start local 4 33: iload 3
iload 2
if_icmple 39
34: aload 4
invokevirtual org.glassfish.grizzly.memory.CompositeBuffer.position:()I
istore 5
start local 5 35: aload 1
iload 2
iload 2
invokestatic org.glassfish.grizzly.memory.Buffers.setPositionLimit:(Lorg/glassfish/grizzly/Buffer;II)V
36: aload 4
invokevirtual org.glassfish.grizzly.memory.CompositeBuffer.trim:()V
37: aload 4
iload 5
iload 2
invokestatic java.lang.Math.min:(II)I
invokevirtual org.glassfish.grizzly.memory.CompositeBuffer.position:(I)Lorg/glassfish/grizzly/Buffer;
pop
38: aload 4
areturn
end local 5 39: StackMap locals: org.glassfish.grizzly.memory.CompositeBuffer
StackMap stack:
aload 0
aload 4
iload 2
iload 3
isub
invokevirtual org.glassfish.grizzly.memory.PooledMemoryManager.allocateToCompositeBuffer:(Lorg/glassfish/grizzly/memory/CompositeBuffer;I)Lorg/glassfish/grizzly/memory/CompositeBuffer;
areturn
end local 4 end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 40 0 this Lorg/glassfish/grizzly/memory/PooledMemoryManager;
0 40 1 oldBuffer Lorg/glassfish/grizzly/Buffer;
0 40 2 newSize I
4 40 3 curBufSize I
7 17 4 oldPoolBuffer Lorg/glassfish/grizzly/memory/PooledMemoryManager$PoolBuffer;
8 17 5 newPool Lorg/glassfish/grizzly/memory/PooledMemoryManager$Pool;
10 16 6 pos I
11 16 7 newPoolBuffer Lorg/glassfish/grizzly/Buffer;
18 31 4 pos I
21 26 5 newPool Lorg/glassfish/grizzly/memory/PooledMemoryManager$Pool;
22 26 6 newPoolBuffer Lorg/glassfish/grizzly/Buffer;
27 31 5 cb Lorg/glassfish/grizzly/memory/CompositeBuffer;
33 40 4 oldCompositeBuffer Lorg/glassfish/grizzly/memory/CompositeBuffer;
35 39 5 oldPos I
MethodParameters:
Name Flags
oldBuffer final
newSize final
public void release(org.glassfish.grizzly.Buffer);
descriptor: (Lorg/glassfish/grizzly/Buffer;)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=1, locals=2, args_size=2
start local 0 start local 1 0: aload 1
invokeinterface org.glassfish.grizzly.Buffer.tryDispose:()Z
pop
1: return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 this Lorg/glassfish/grizzly/memory/PooledMemoryManager;
0 2 1 buffer Lorg/glassfish/grizzly/Buffer;
MethodParameters:
Name Flags
buffer final
public boolean willAllocateDirect(int);
descriptor: (I)Z
flags: (0x0001) ACC_PUBLIC
Code:
stack=1, locals=2, args_size=2
start local 0 start local 1 0: iconst_0
ireturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lorg/glassfish/grizzly/memory/PooledMemoryManager;
0 1 1 size I
MethodParameters:
Name Flags
size final
public org.glassfish.grizzly.monitoring.MonitoringConfig<org.glassfish.grizzly.memory.MemoryProbe> getMonitoringConfig();
descriptor: ()Lorg/glassfish/grizzly/monitoring/MonitoringConfig;
flags: (0x0001) ACC_PUBLIC
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
getfield org.glassfish.grizzly.memory.PooledMemoryManager.monitoringConfig:Lorg/glassfish/grizzly/monitoring/DefaultMonitoringConfig;
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lorg/glassfish/grizzly/memory/PooledMemoryManager;
Signature: ()Lorg/glassfish/grizzly/monitoring/MonitoringConfig<Lorg/glassfish/grizzly/memory/MemoryProbe;>;
public org.glassfish.grizzly.Buffer wrap(byte[]);
descriptor: ([B)Lorg/glassfish/grizzly/Buffer;
flags: (0x0001) ACC_PUBLIC
Code:
stack=2, locals=2, args_size=2
start local 0 start local 1 0: aload 0
aload 1
invokestatic java.nio.ByteBuffer.wrap:([B)Ljava/nio/ByteBuffer;
invokevirtual org.glassfish.grizzly.memory.PooledMemoryManager.wrap:(Ljava/nio/ByteBuffer;)Lorg/glassfish/grizzly/Buffer;
areturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lorg/glassfish/grizzly/memory/PooledMemoryManager;
0 1 1 data [B
MethodParameters:
Name Flags
data final
public org.glassfish.grizzly.Buffer wrap(byte[], int, int);
descriptor: ([BII)Lorg/glassfish/grizzly/Buffer;
flags: (0x0001) ACC_PUBLIC
Code:
stack=4, locals=4, args_size=4
start local 0 start local 1 start local 2 start local 3 0: aload 0
aload 1
iload 2
iload 3
invokestatic java.nio.ByteBuffer.wrap:([BII)Ljava/nio/ByteBuffer;
invokevirtual org.glassfish.grizzly.memory.PooledMemoryManager.wrap:(Ljava/nio/ByteBuffer;)Lorg/glassfish/grizzly/Buffer;
areturn
end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lorg/glassfish/grizzly/memory/PooledMemoryManager;
0 1 1 data [B
0 1 2 offset I
0 1 3 length I
MethodParameters:
Name Flags
data
offset
length
public org.glassfish.grizzly.Buffer wrap(java.lang.String);
descriptor: (Ljava/lang/String;)Lorg/glassfish/grizzly/Buffer;
flags: (0x0001) ACC_PUBLIC
Code:
stack=3, locals=2, args_size=2
start local 0 start local 1 0: aload 0
aload 1
invokestatic java.nio.charset.Charset.defaultCharset:()Ljava/nio/charset/Charset;
invokevirtual java.lang.String.getBytes:(Ljava/nio/charset/Charset;)[B
invokevirtual org.glassfish.grizzly.memory.PooledMemoryManager.wrap:([B)Lorg/glassfish/grizzly/Buffer;
areturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lorg/glassfish/grizzly/memory/PooledMemoryManager;
0 1 1 s Ljava/lang/String;
MethodParameters:
Name Flags
s final
public org.glassfish.grizzly.Buffer wrap(java.lang.String, java.nio.charset.Charset);
descriptor: (Ljava/lang/String;Ljava/nio/charset/Charset;)Lorg/glassfish/grizzly/Buffer;
flags: (0x0001) ACC_PUBLIC
Code:
stack=3, locals=3, args_size=3
start local 0 start local 1 start local 2 0: aload 0
aload 1
aload 2
invokevirtual java.lang.String.getBytes:(Ljava/nio/charset/Charset;)[B
invokevirtual org.glassfish.grizzly.memory.PooledMemoryManager.wrap:([B)Lorg/glassfish/grizzly/Buffer;
areturn
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lorg/glassfish/grizzly/memory/PooledMemoryManager;
0 1 1 s Ljava/lang/String;
0 1 2 charset Ljava/nio/charset/Charset;
MethodParameters:
Name Flags
s final
charset final
public org.glassfish.grizzly.Buffer wrap(java.nio.ByteBuffer);
descriptor: (Ljava/nio/ByteBuffer;)Lorg/glassfish/grizzly/Buffer;
flags: (0x0001) ACC_PUBLIC
Code:
stack=3, locals=2, args_size=2
start local 0 start local 1 0: new org.glassfish.grizzly.memory.ByteBufferWrapper
dup
aload 1
invokespecial org.glassfish.grizzly.memory.ByteBufferWrapper.<init>:(Ljava/nio/ByteBuffer;)V
areturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lorg/glassfish/grizzly/memory/PooledMemoryManager;
0 1 1 byteBuffer Ljava/nio/ByteBuffer;
MethodParameters:
Name Flags
byteBuffer final
protected java.lang.Object createJmxManagementObject();
descriptor: ()Ljava/lang/Object;
flags: (0x0004) ACC_PROTECTED
Code:
stack=3, locals=1, args_size=1
start local 0 0: ldc "org.glassfish.grizzly.memory.jmx.PooledMemoryManager"
aload 0
ldc Lorg/glassfish/grizzly/memory/PooledMemoryManager;
invokestatic org.glassfish.grizzly.monitoring.MonitoringUtils.loadJmxObject:(Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Class;)Ljava/lang/Object;
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lorg/glassfish/grizzly/memory/PooledMemoryManager;
org.glassfish.grizzly.memory.PooledMemoryManager$Pool[] getPools();
descriptor: ()[Lorg/glassfish/grizzly/memory/PooledMemoryManager$Pool;
flags: (0x0000)
Code:
stack=2, locals=1, args_size=1
start local 0 0: aload 0
getfield org.glassfish.grizzly.memory.PooledMemoryManager.pools:[Lorg/glassfish/grizzly/memory/PooledMemoryManager$Pool;
aload 0
getfield org.glassfish.grizzly.memory.PooledMemoryManager.pools:[Lorg/glassfish/grizzly/memory/PooledMemoryManager$Pool;
arraylength
invokestatic java.util.Arrays.copyOf:([Ljava/lang/Object;I)[Ljava/lang/Object;
checkcast org.glassfish.grizzly.memory.PooledMemoryManager$Pool[]
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lorg/glassfish/grizzly/memory/PooledMemoryManager;
private org.glassfish.grizzly.memory.PooledMemoryManager$Pool getPoolFor(int);
descriptor: (I)Lorg/glassfish/grizzly/memory/PooledMemoryManager$Pool;
flags: (0x0002) ACC_PRIVATE
Code:
stack=5, locals=4, args_size=2
start local 0 start local 1 0: iconst_0
istore 2
start local 2 1: goto 6
2: StackMap locals: int
StackMap stack:
aload 0
getfield org.glassfish.grizzly.memory.PooledMemoryManager.pools:[Lorg/glassfish/grizzly/memory/PooledMemoryManager$Pool;
iload 2
aaload
astore 3
start local 3 3: aload 3
getfield org.glassfish.grizzly.memory.PooledMemoryManager$Pool.bufferSize:I
iload 1
if_icmplt 5
4: aload 3
areturn
end local 3 5: StackMap locals:
StackMap stack:
iinc 2 1
StackMap locals:
StackMap stack:
6: iload 2
aload 0
getfield org.glassfish.grizzly.memory.PooledMemoryManager.pools:[Lorg/glassfish/grizzly/memory/PooledMemoryManager$Pool;
arraylength
if_icmplt 2
end local 2 7: new java.lang.IllegalStateException
dup
new java.lang.StringBuilder
dup
ldc "There is no pool big enough to allocate "
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
iload 1
invokevirtual java.lang.StringBuilder.append:(I)Ljava/lang/StringBuilder;
ldc " bytes"
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
invokespecial java.lang.IllegalStateException.<init>:(Ljava/lang/String;)V
athrow
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 8 0 this Lorg/glassfish/grizzly/memory/PooledMemoryManager;
0 8 1 size I
1 7 2 i I
3 5 3 pool Lorg/glassfish/grizzly/memory/PooledMemoryManager$Pool;
MethodParameters:
Name Flags
size final
private org.glassfish.grizzly.memory.CompositeBuffer allocateToCompositeBuffer(org.glassfish.grizzly.memory.CompositeBuffer, int);
descriptor: (Lorg/glassfish/grizzly/memory/CompositeBuffer;I)Lorg/glassfish/grizzly/memory/CompositeBuffer;
flags: (0x0002) ACC_PRIVATE
Code:
stack=3, locals=6, args_size=3
start local 0 start local 1 start local 2 0: getstatic org.glassfish.grizzly.memory.PooledMemoryManager.$assertionsDisabled:Z
ifne 1
iload 2
ifge 1
new java.lang.AssertionError
dup
invokespecial java.lang.AssertionError.<init>:()V
athrow
1: StackMap locals:
StackMap stack:
iload 2
aload 0
getfield org.glassfish.grizzly.memory.PooledMemoryManager.maxPooledBufferSize:I
if_icmplt 7
2: aload 0
getfield org.glassfish.grizzly.memory.PooledMemoryManager.pools:[Lorg/glassfish/grizzly/memory/PooledMemoryManager$Pool;
aload 0
getfield org.glassfish.grizzly.memory.PooledMemoryManager.pools:[Lorg/glassfish/grizzly/memory/PooledMemoryManager$Pool;
arraylength
iconst_1
isub
aaload
astore 3
start local 3 3: StackMap locals: org.glassfish.grizzly.memory.PooledMemoryManager$Pool
StackMap stack:
aload 1
aload 3
invokevirtual org.glassfish.grizzly.memory.PooledMemoryManager$Pool.allocate:()Lorg/glassfish/grizzly/Buffer;
invokevirtual org.glassfish.grizzly.memory.CompositeBuffer.append:(Lorg/glassfish/grizzly/Buffer;)Lorg/glassfish/grizzly/memory/CompositeBuffer;
pop
4: iload 2
aload 0
getfield org.glassfish.grizzly.memory.PooledMemoryManager.maxPooledBufferSize:I
isub
istore 2
5: iload 2
aload 0
getfield org.glassfish.grizzly.memory.PooledMemoryManager.maxPooledBufferSize:I
6: if_icmpge 3
end local 3 7: StackMap locals:
StackMap stack:
iconst_0
istore 3
start local 3 8: goto 15
9: StackMap locals: int
StackMap stack:
aload 0
getfield org.glassfish.grizzly.memory.PooledMemoryManager.pools:[Lorg/glassfish/grizzly/memory/PooledMemoryManager$Pool;
iload 3
aaload
astore 4
start local 4 10: aload 4
getfield org.glassfish.grizzly.memory.PooledMemoryManager$Pool.bufferSize:I
iload 2
if_icmplt 14
11: aload 4
invokevirtual org.glassfish.grizzly.memory.PooledMemoryManager$Pool.allocate:()Lorg/glassfish/grizzly/Buffer;
astore 5
start local 5 12: aload 1
aload 5
iload 2
invokeinterface org.glassfish.grizzly.Buffer.limit:(I)Lorg/glassfish/grizzly/Buffer;
invokevirtual org.glassfish.grizzly.memory.CompositeBuffer.append:(Lorg/glassfish/grizzly/Buffer;)Lorg/glassfish/grizzly/memory/CompositeBuffer;
pop
13: goto 16
end local 5 end local 4 14: StackMap locals:
StackMap stack:
iinc 3 1
StackMap locals:
StackMap stack:
15: iload 3
aload 0
getfield org.glassfish.grizzly.memory.PooledMemoryManager.pools:[Lorg/glassfish/grizzly/memory/PooledMemoryManager$Pool;
arraylength
if_icmplt 9
end local 3 16: StackMap locals:
StackMap stack:
aload 1
areturn
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 17 0 this Lorg/glassfish/grizzly/memory/PooledMemoryManager;
0 17 1 cb Lorg/glassfish/grizzly/memory/CompositeBuffer;
0 17 2 size I
3 7 3 maxBufferSizePool Lorg/glassfish/grizzly/memory/PooledMemoryManager$Pool;
8 16 3 i I
10 14 4 pool Lorg/glassfish/grizzly/memory/PooledMemoryManager$Pool;
12 14 5 b Lorg/glassfish/grizzly/Buffer;
MethodParameters:
Name Flags
cb final
size
private org.glassfish.grizzly.memory.CompositeBuffer newCompositeBuffer();
descriptor: ()Lorg/glassfish/grizzly/memory/CompositeBuffer;
flags: (0x0002) ACC_PRIVATE
Code:
stack=2, locals=2, args_size=1
start local 0 0: aload 0
invokestatic org.glassfish.grizzly.memory.CompositeBuffer.newBuffer:(Lorg/glassfish/grizzly/memory/MemoryManager;)Lorg/glassfish/grizzly/memory/CompositeBuffer;
astore 1
start local 1 1: aload 1
iconst_1
invokevirtual org.glassfish.grizzly.memory.CompositeBuffer.allowInternalBuffersDispose:(Z)V
2: aload 1
iconst_1
invokevirtual org.glassfish.grizzly.memory.CompositeBuffer.allowBufferDispose:(Z)V
3: aload 1
areturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 4 0 this Lorg/glassfish/grizzly/memory/PooledMemoryManager;
1 4 1 cb Lorg/glassfish/grizzly/memory/CompositeBuffer;
private static boolean isPowerOfTwo(int);
descriptor: (I)Z
flags: (0x000a) ACC_PRIVATE, ACC_STATIC
Code:
stack=3, locals=1, args_size=1
start local 0 0: iload 0
iload 0
iconst_1
isub
iand
ifne 1
iconst_1
ireturn
StackMap locals:
StackMap stack:
1: iconst_0
ireturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 valueToCheck I
MethodParameters:
Name Flags
valueToCheck final
private static int fillHighestOneBitRight(int);
descriptor: (I)I
flags: (0x000a) ACC_PRIVATE, ACC_STATIC
Code:
stack=3, locals=1, args_size=1
start local 0 0: iload 0
iload 0
iconst_1
ishr
ior
istore 0
1: iload 0
iload 0
iconst_2
ishr
ior
istore 0
2: iload 0
iload 0
iconst_4
ishr
ior
istore 0
3: iload 0
iload 0
bipush 8
ishr
ior
istore 0
4: iload 0
iload 0
bipush 16
ishr
ior
istore 0
5: iload 0
ireturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 6 0 value I
MethodParameters:
Name Flags
value
}
Signature: Ljava/lang/Object;Lorg/glassfish/grizzly/memory/MemoryManager<Lorg/glassfish/grizzly/Buffer;>;Lorg/glassfish/grizzly/memory/WrapperAware;
SourceFile: "PooledMemoryManager.java"
NestMembers:
org.glassfish.grizzly.memory.PooledMemoryManager$1 org.glassfish.grizzly.memory.PooledMemoryManager$Pool org.glassfish.grizzly.memory.PooledMemoryManager$PoolBuffer org.glassfish.grizzly.memory.PooledMemoryManager$PoolByteBufferWrapper org.glassfish.grizzly.memory.PooledMemoryManager$PoolHeapBuffer org.glassfish.grizzly.memory.PooledMemoryManager$PoolHeapBuffer$1 org.glassfish.grizzly.memory.PooledMemoryManager$PoolSlice org.glassfish.grizzly.memory.PooledMemoryManager$PoolSlice$PaddedAtomicInteger org.glassfish.grizzly.memory.PooledMemoryManager$PoolSlice$PaddedAtomicReferenceArray
InnerClasses:
org.glassfish.grizzly.memory.PooledMemoryManager$1
final Pool = org.glassfish.grizzly.memory.PooledMemoryManager$Pool of org.glassfish.grizzly.memory.PooledMemoryManager
abstract PoolBuffer = org.glassfish.grizzly.memory.PooledMemoryManager$PoolBuffer of org.glassfish.grizzly.memory.PooledMemoryManager
private final PoolByteBufferWrapper = org.glassfish.grizzly.memory.PooledMemoryManager$PoolByteBufferWrapper of org.glassfish.grizzly.memory.PooledMemoryManager
private final PoolHeapBuffer = org.glassfish.grizzly.memory.PooledMemoryManager$PoolHeapBuffer of org.glassfish.grizzly.memory.PooledMemoryManager
final PoolSlice = org.glassfish.grizzly.memory.PooledMemoryManager$PoolSlice of org.glassfish.grizzly.memory.PooledMemoryManager