Skip to content

Commit

Permalink
Avoid double-wrapping allocator (#49534)
Browse files Browse the repository at this point in the history
When using unpooled, the allocator is wrapped twice in a NoDirectBuffers.
  • Loading branch information
ywelsch authored Nov 27, 2019
1 parent 3429f79 commit 403b938
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public class NettyAllocator {
} else {
ByteBufAllocator delegate;
if (useUnpooled()) {
delegate = new NoDirectBuffers(UnpooledByteBufAllocator.DEFAULT);
delegate = UnpooledByteBufAllocator.DEFAULT;
} else {
int nHeapArena = PooledByteBufAllocator.defaultNumHeapArena();
int pageSize = PooledByteBufAllocator.defaultPageSize();
Expand Down

0 comments on commit 403b938

Please sign in to comment.