Package io.netty.buffer
Class AdaptivePoolingAllocator.Magazine
java.lang.Object
io.netty.buffer.AdaptivePoolingAllocator.AllocationStatistics
io.netty.buffer.AdaptivePoolingAllocator.Magazine
- Enclosing class:
AdaptivePoolingAllocator
private static final class AdaptivePoolingAllocator.Magazine
extends AdaptivePoolingAllocator.AllocationStatistics
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final StampedLock
private final Queue
<AdaptivePoolingAllocator.AdaptiveByteBuf> private AdaptivePoolingAllocator.Chunk
private static final ObjectPool
<AdaptivePoolingAllocator.AdaptiveByteBuf> private final ObjectPool.Handle
<AdaptivePoolingAllocator.AdaptiveByteBuf> private static final AdaptivePoolingAllocator.Chunk
private static final AtomicReferenceFieldUpdater
<AdaptivePoolingAllocator.Magazine, AdaptivePoolingAllocator.Chunk> private AdaptivePoolingAllocator.Chunk
private final AtomicLong
Fields inherited from class io.netty.buffer.AdaptivePoolingAllocator.AllocationStatistics
localPrefChunkSize, parent, sharedPrefChunkSize
-
Constructor Summary
ConstructorsConstructorDescriptionMagazine
(AdaptivePoolingAllocator parent) Magazine
(AdaptivePoolingAllocator parent, boolean shareable) -
Method Summary
Modifier and TypeMethodDescriptionprivate boolean
allocate
(int size, int sizeBucket, int maxCapacity, AdaptivePoolingAllocator.AdaptiveByteBuf buf) (package private) void
free()
private AdaptivePoolingAllocator.Chunk
newChunkAllocation
(int promptingSize) private void
private void
boolean
tryAllocate
(int size, int sizeBucket, int maxCapacity, AdaptivePoolingAllocator.AdaptiveByteBuf buf) (package private) boolean
Methods inherited from class io.netty.buffer.AdaptivePoolingAllocator.AllocationStatistics
preferredChunkSize, recordAllocationSize, sizeBucket
-
Field Details
-
NEXT_IN_LINE
private static final AtomicReferenceFieldUpdater<AdaptivePoolingAllocator.Magazine,AdaptivePoolingAllocator.Chunk> NEXT_IN_LINE -
MAGAZINE_FREED
-
EVENT_LOOP_LOCAL_BUFFER_POOL
private static final ObjectPool<AdaptivePoolingAllocator.AdaptiveByteBuf> EVENT_LOOP_LOCAL_BUFFER_POOL -
current
-
nextInLine
-
usedMemory
-
allocationLock
-
bufferQueue
-
handle
-
-
Constructor Details
-
Magazine
Magazine(AdaptivePoolingAllocator parent) -
Magazine
Magazine(AdaptivePoolingAllocator parent, boolean shareable)
-
-
Method Details
-
tryAllocate
public boolean tryAllocate(int size, int sizeBucket, int maxCapacity, AdaptivePoolingAllocator.AdaptiveByteBuf buf) -
allocate
private boolean allocate(int size, int sizeBucket, int maxCapacity, AdaptivePoolingAllocator.AdaptiveByteBuf buf) -
restoreMagazineFreed
private void restoreMagazineFreed() -
transferChunk
-
newChunkAllocation
-
trySetNextInLine
-
free
void free() -
newBuffer
-