Skip to content

Commit

Permalink
Merge pull request quarkusio#39824 from franz1981/allocator
Browse files Browse the repository at this point in the history
Replace wrong Vertx direct allocator with Netty one
  • Loading branch information
geoand authored Apr 2, 2024
2 parents 2f687bb + 168720e commit 0f776ad
Showing 1 changed file with 1 addition and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
import io.netty.buffer.CompositeByteBuf;
import io.netty.buffer.PooledByteBufAllocator;
import io.netty.util.internal.PlatformDependent;
import io.vertx.core.buffer.impl.PartialPooledByteBufAllocator;
import io.vertx.core.buffer.impl.VertxByteBufAllocator;

/**
Expand Down Expand Up @@ -134,8 +133,7 @@ public int append(byte[] bytes, int off, int len) {
// VertxByteBufAllocator allocates cheaper heap buffers ie which doesn't use reference counting
tmpBuf = VertxByteBufAllocator.DEFAULT.heapBuffer(chunkCapacity);
} else {
// Vertx should replace the "standerd" PooledByteBufAllocator.DEFAULT this one
tmpBuf = PartialPooledByteBufAllocator.INSTANCE.directBuffer(chunkCapacity);
tmpBuf = PooledByteBufAllocator.DEFAULT.directBuffer(chunkCapacity);
}
try {
tmpBuf.writeBytes(bytes, off, toWrite);
Expand Down

0 comments on commit 0f776ad

Please sign in to comment.