Switch to the new pooling allocator by default for heap buffers

This commit is contained in:
Chris Vest 2021-05-12 10:52:22 +02:00
parent 1daa0685dc
commit 481b2ddd3d
1 changed files with 4 additions and 1 deletions

View File

@ -15,6 +15,8 @@
*/
package io.netty.buffer.api;
import io.netty.buffer.api.pool.PooledBufferAllocator;
import java.nio.ByteOrder;
import java.util.function.Supplier;
@ -123,7 +125,8 @@ public interface BufferAllocator extends AutoCloseable {
}
static BufferAllocator pooledHeap() {
return new SizeClassedMemoryPool(MemoryManagers.getManagers().getHeapMemoryManager());
return new PooledBufferAllocator(MemoryManagers.getManagers().getHeapMemoryManager());
// return new SizeClassedMemoryPool(MemoryManagers.getManagers().getHeapMemoryManager());
}
static BufferAllocator pooledDirect() {