Class AdaptivePoolingAllocator.SizeClassedChunk
java.lang.Object
io.netty.buffer.AdaptivePoolingAllocator.Chunk
io.netty.buffer.AdaptivePoolingAllocator.SizeClassedChunk
- All Implemented Interfaces:
ReferenceCounted
- Enclosing class:
AdaptivePoolingAllocator
private static final class AdaptivePoolingAllocator.SizeClassedChunk
extends AdaptivePoolingAllocator.Chunk
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final MpscIntQueueprivate static final intprivate final AdaptivePoolingAllocator.IntStackprivate Threadprivate final intFields inherited from class AdaptivePoolingAllocator.Chunk
allocatedBytes, delegate, magazine -
Constructor Summary
ConstructorsConstructorDescriptionSizeClassedChunk(AbstractByteBuf delegate, AdaptivePoolingAllocator.Magazine magazine, AdaptivePoolingAllocator.SizeClassChunkController controller) -
Method Summary
Modifier and TypeMethodDescriptionprivate intbooleanreadInitInto(AdaptivePoolingAllocator.AdaptiveByteBuf buf, int size, int startingCapacity, int maxCapacity) (package private) voidreleaseSegment(int startIndex, int size) Called when a ByteBuf is done using its allocation in this chunk.private voidreleaseSegmentOffsetIntoFreeList(int startIndex) intprivate intMethods inherited from class AdaptivePoolingAllocator.Chunk
attachToMagazine, capacity, currentMagazine, deallocate, detachFromMagazine, hasUnprocessedFreelistEntries, processFreelistEntries, refCnt, release, release, releaseFromMagazine, retain, retain, touch, touch
-
Field Details
-
FREE_LIST_EMPTY
private static final int FREE_LIST_EMPTY- See Also:
-
segmentSize
private final int segmentSize -
externalFreeList
-
localFreeList
-
ownerThread
-
-
Constructor Details
-
SizeClassedChunk
SizeClassedChunk(AbstractByteBuf delegate, AdaptivePoolingAllocator.Magazine magazine, AdaptivePoolingAllocator.SizeClassChunkController controller)
-
-
Method Details
-
readInitInto
public boolean readInitInto(AdaptivePoolingAllocator.AdaptiveByteBuf buf, int size, int startingCapacity, int maxCapacity) - Overrides:
readInitIntoin classAdaptivePoolingAllocator.Chunk
-
nextAvailableSegmentOffset
private int nextAvailableSegmentOffset() -
remainingCapacityOnFreeList
private int remainingCapacityOnFreeList() -
remainingCapacity
public int remainingCapacity()- Overrides:
remainingCapacityin classAdaptivePoolingAllocator.Chunk
-
releaseSegmentOffsetIntoFreeList
private void releaseSegmentOffsetIntoFreeList(int startIndex) -
releaseSegment
void releaseSegment(int startIndex, int size) Description copied from class:AdaptivePoolingAllocator.ChunkCalled when a ByteBuf is done using its allocation in this chunk.- Overrides:
releaseSegmentin classAdaptivePoolingAllocator.Chunk
-