Switch to the new pooling allocator by default for heap buffers
This commit is contained in:
parent
1daa0685dc
commit
481b2ddd3d
@ -15,6 +15,8 @@
|
|||||||
*/
|
*/
|
||||||
package io.netty.buffer.api;
|
package io.netty.buffer.api;
|
||||||
|
|
||||||
|
import io.netty.buffer.api.pool.PooledBufferAllocator;
|
||||||
|
|
||||||
import java.nio.ByteOrder;
|
import java.nio.ByteOrder;
|
||||||
import java.util.function.Supplier;
|
import java.util.function.Supplier;
|
||||||
|
|
||||||
@ -123,7 +125,8 @@ public interface BufferAllocator extends AutoCloseable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
static BufferAllocator pooledHeap() {
|
static BufferAllocator pooledHeap() {
|
||||||
return new SizeClassedMemoryPool(MemoryManagers.getManagers().getHeapMemoryManager());
|
return new PooledBufferAllocator(MemoryManagers.getManagers().getHeapMemoryManager());
|
||||||
|
// return new SizeClassedMemoryPool(MemoryManagers.getManagers().getHeapMemoryManager());
|
||||||
}
|
}
|
||||||
|
|
||||||
static BufferAllocator pooledDirect() {
|
static BufferAllocator pooledDirect() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user