io.netty.buffer.PooledByteBufAllocator.class Maven / Gradle / Ivy
???? 2 &io/netty/buffer/PooledByteBufAllocator (io/netty/buffer/AbstractByteBufAllocator .io/netty/buffer/ByteBufAllocatorMetricProvider PooledByteBufAllocator.java ;io/netty/buffer/PooledByteBufAllocator$PoolThreadLocalCache PoolThreadLocalCache #io/netty/buffer/PoolArena$HeapArena io/netty/buffer/PoolArena
HeapArena %io/netty/buffer/PoolArena$DirectArena DirectArena logger /Lio/netty/util/internal/logging/InternalLogger; DEFAULT_NUM_HEAP_ARENA I DEFAULT_NUM_DIRECT_ARENA DEFAULT_PAGE_SIZE DEFAULT_MAX_ORDER DEFAULT_TINY_CACHE_SIZE DEFAULT_SMALL_CACHE_SIZE DEFAULT_NORMAL_CACHE_SIZE "DEFAULT_MAX_CACHED_BUFFER_CAPACITY DEFAULT_CACHE_TRIM_INTERVAL !DEFAULT_USE_CACHE_FOR_ALL_THREADS Z %DEFAULT_DIRECT_MEMORY_CACHE_ALIGNMENT
MIN_PAGE_SIZE MAX_CHUNK_SIZE@ DEFAULT (Lio/netty/buffer/PooledByteBufAllocator;
heapArenas [Lio/netty/buffer/PoolArena; [Lio/netty/buffer/PoolArena<[B>; directArenas 3[Lio/netty/buffer/PoolArena;
tinyCacheSize smallCacheSize normalCacheSize heapArenaMetrics Ljava/util/List; 3Ljava/util/List; directArenaMetrics threadCache =Lio/netty/buffer/PooledByteBufAllocator$PoolThreadLocalCache; chunkSize metric .Lio/netty/buffer/PooledByteBufAllocatorMetric; ()V (Z)V 9 ;
< this ? A C E (ZIIII)V 9 G
H preferDirect (IIII)V
nHeapArena nDirectArena pageSize maxOrder Ljava/lang/Deprecated; Q S U (ZIIIIIII)V 9 W
X Z ! \
(ZIIIIIIIZI)V 9 ^
_ (ZIIIIIIIZ)V useCacheForAllThreads
< ,(Lio/netty/buffer/PooledByteBufAllocator;Z)V 9 d
e 4 5 g - i . k / m validateAndCalculateChunkSize (II)I o p
q 6 s "java/lang/IllegalArgumentException u java/lang/StringBuilder w 9 :
x y nHeapArena: { append -(Ljava/lang/String;)Ljava/lang/StringBuilder; } ~
x (I)Ljava/lang/StringBuilder; } ?
x ? (expected: >= 0) ? toString ()Ljava/lang/String; ? ?
x ? (Ljava/lang/String;)V 9 ?
v ?
nDirectArea: ? directMemoryCacheAlignment: ? %isDirectMemoryCacheAlignmentSupported ()Z ? ?
? +directMemoryCacheAlignment is not supported ? (expected: power of two) ? validateAndCalculatePageShifts (I)I ? ?
?
newArenaArray (I)[Lio/netty/buffer/PoolArena; ? ?
? ( ) ? java/util/ArrayList ? (I)V 9 ?
? ? java/util/List ? 0(Lio/netty/buffer/PooledByteBufAllocator;IIIII)V 9 ?
? add (Ljava/lang/Object;)Z ? ? ? ? java/util/Collections ? unmodifiableList "(Ljava/util/List;)Ljava/util/List; ? ?
? ? 0 1 ? emptyList ()Ljava/util/List; ? ?
? ? + ) ?
? 3 1 ? ,io/netty/buffer/PooledByteBufAllocatorMetric ? +(Lio/netty/buffer/PooledByteBufAllocator;)V 9 ?
? ? 7 8 ? arena %Lio/netty/buffer/PoolArena$HeapArena; i metrics 'Lio/netty/buffer/PoolArena$DirectArena; directMemoryCacheAlignment
pageShifts size
pageSize: ? (expected: ? ) ? (expected: power of 2) ? java/lang/Integer ? numberOfLeadingZeros ? ?
? ?
maxOrder: ? (expected: 0-14) ? 1pageSize (%d) << maxOrder (%d) must not exceed %d ? java/lang/Object ? valueOf (I)Ljava/lang/Integer; ? ?
? ? java/lang/String ? format 9(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String; ? ?
? ?
newHeapBuffer (II)Lio/netty/buffer/ByteBuf; get ()Ljava/lang/Object; ? ?
? io/netty/buffer/PoolThreadCache ? heapArena Lio/netty/buffer/PoolArena; ? ? ? ? allocate D(Lio/netty/buffer/PoolThreadCache;II)Lio/netty/buffer/PooledByteBuf; ? ?
? (io/netty/util/internal/PlatformDependent hasUnsafe ?
)io/netty/buffer/UnpooledUnsafeHeapByteBuf '(Lio/netty/buffer/ByteBufAllocator;II)V 9
#io/netty/buffer/UnpooledHeapByteBuf
io/netty/buffer/ByteBuf toLeakAwareBuffer 4(Lio/netty/buffer/ByteBuf;)Lio/netty/buffer/ByteBuf;
buf Lio/netty/buffer/ByteBuf; initialCapacity maxCapacity cache !Lio/netty/buffer/PoolThreadCache; Lio/netty/buffer/PoolArena<[B>; newDirectBuffer directArena ? ? !io/netty/buffer/UnsafeByteBufUtil newUnsafeDirectByteBuf S(Lio/netty/buffer/ByteBufAllocator;II)Lio/netty/buffer/UnpooledUnsafeDirectByteBuf;!"
# %io/netty/buffer/UnpooledDirectByteBuf%
& /io/netty/buffer/AbstractReferenceCountedByteBuf( 2Lio/netty/buffer/PoolArena; defaultNumHeapArena ()I defaultNumDirectArena defaultPageSize defaultMaxOrder defaultTinyCacheSize defaultSmallCacheSize defaultNormalCacheSize isDirectBufferPooled hasThreadLocalCache isSet5 ?
6 freeThreadLocalCache remove9 :
: 0()Lio/netty/buffer/PooledByteBufAllocatorMetric;
numHeapArenas ?, ?> numDirectArenas numThreadLocalCaches ) numThreadCaches +Ljava/util/concurrent/atomic/AtomicInteger;CD E )java/util/concurrent/atomic/AtomicIntegerG ?,
HI Lio/netty/buffer/PoolArena<*>; arenas [Lio/netty/buffer/PoolArena<*>; total usedHeapMemory ()J
usedMemory ([Lio/netty/buffer/PoolArena;)JQR
S usedDirectMemory???????? numActiveBytesXP
Y??????? used J #()Lio/netty/buffer/PoolThreadCache; dumpStats
x ? heap arena(s):b !io/netty/util/internal/StringUtild NEWLINE Ljava/lang/String;fg eh -(Ljava/lang/Object;)Ljava/lang/StringBuilder; }j
xk direct arena(s):m a
heapArenasLen Ljava/lang/StringBuilder; directArenasLen *()Lio/netty/buffer/ByteBufAllocatorMetric; 7<
t
access$000 F(Lio/netty/buffer/PooledByteBufAllocator;)[Lio/netty/buffer/PoolArena; x0
access$100
access$200 +(Lio/netty/buffer/PooledByteBufAllocator;)I
access$300
access$400
access$500
access$600 ? java/lang/Throwable? 4io/netty/util/internal/logging/InternalLoggerFactory? getInstance B(Ljava/lang/Class;)Lio/netty/util/internal/logging/InternalLogger;??
?? ? io.netty.allocator.pageSize? )io/netty/util/internal/SystemPropertyUtil? getInt (Ljava/lang/String;I)I??
?? io.netty.allocator.maxOrder? java/lang/Runtime?
getRuntime ()Ljava/lang/Runtime;??
?? io/netty/util/NettyRuntime? availableProcessors?,
?? io.netty.allocator.numHeapArenas? maxMemory?P
?? java/lang/Math? min (JJ)J??
?? max? p
?? "io.netty.allocator.numDirectArenas? maxDirectMemory?P
? io.netty.allocator.tinyCacheSize? !io.netty.allocator.smallCacheSize? "io.netty.allocator.normalCacheSize? *io.netty.allocator.maxCachedBufferCapacity? ? $io.netty.allocator.cacheTrimInterval? (io.netty.allocator.useCacheForAllThreads?
getBoolean (Ljava/lang/String;Z)Z??
?? -io.netty.allocator.directMemoryCacheAlignment? -io/netty/util/internal/logging/InternalLogger? isDebugEnabled? ??? &-Dio.netty.allocator.numHeapArenas: {}? debug '(Ljava/lang/String;Ljava/lang/Object;)V???? (-Dio.netty.allocator.numDirectArenas: {}? !-Dio.netty.allocator.pageSize: {}? 9(Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;)V???? !-Dio.netty.allocator.maxOrder: {}? "-Dio.netty.allocator.chunkSize: {}? &-Dio.netty.allocator.tinyCacheSize: {}? '-Dio.netty.allocator.smallCacheSize: {}? (-Dio.netty.allocator.normalCacheSize: {}? 0-Dio.netty.allocator.maxCachedBufferCapacity: {}? *-Dio.netty.allocator.cacheTrimInterval: {}? .-Dio.netty.allocator.useCacheForAllThreads: {}? java/lang/Boolean? (Z)Ljava/lang/Boolean; ??
?? directBufferPreferred? ?
? &