@@ -271,6 +271,55 @@ protected ByteBuf newDirectBuffer(int initialCapacity, int maxCapacity) {
271
271
return toLeakAwareBuffer (buf );
272
272
}
273
273
274
+ /**
275
+ * Default number of heap areanas - System Property: io.netty.allocator.numHeapArenas - default 2 * cores
276
+ */
277
+ public static int defaultNumHeapArena () {
278
+ return DEFAULT_NUM_HEAP_ARENA ;
279
+ }
280
+
281
+ /**
282
+ * Default numer of direct arenas - System Property: io.netty.allocator.numDirectArenas - default 2 * cores
283
+ */
284
+ public static int defaultNumDirectArena () {
285
+ return DEFAULT_NUM_DIRECT_ARENA ;
286
+ }
287
+
288
+ /**
289
+ * Default buffer page size - System Property: io.netty.allocator.pageSize - default 8192
290
+ */
291
+ public static int defaultPageSize () {
292
+ return DEFAULT_PAGE_SIZE ;
293
+ }
294
+
295
+ /**
296
+ * Default maximum order - System Property: io.netty.allocator.maxOrder - default 11
297
+ */
298
+ public static int defaultMaxOrder () {
299
+ return DEFAULT_MAX_ORDER ;
300
+ }
301
+
302
+ /**
303
+ * Default tiny cache size - System Property: io.netty.allocator.tinyCacheSize - default 512
304
+ */
305
+ public static int defaultTinyCacheSize () {
306
+ return DEFAULT_TINY_CACHE_SIZE ;
307
+ }
308
+
309
+ /**
310
+ * Default small cache size - System Property: io.netty.allocator.smallCacheSize - default 256
311
+ */
312
+ public static int defaultSmallCacheSize () {
313
+ return DEFAULT_SMALL_CACHE_SIZE ;
314
+ }
315
+
316
+ /**
317
+ * Default normal cache size - System Property: io.netty.allocator.normalCacheSize - default 64
318
+ */
319
+ public static int defaultNormalCacheSize () {
320
+ return DEFAULT_NORMAL_CACHE_SIZE ;
321
+ }
322
+
274
323
@ Override
275
324
public boolean isDirectBufferPooled () {
276
325
return directArenas != null ;
0 commit comments