netty5/buffer/src
Matteo Merli 27c68647df In (Pooled|Unpooled)UnsafeDirectByteBuf copy memory directly to and from ByteBuffer
Motivation:

When moving bytes between a PooledUnsafeDirectByteBuf or an UnpooledUnsafeDirectByteBuf
and a ByteBuffer, a temp ByteBuffer is allocated and will need to be GCed. This is a
common case since a ByteBuffer is always needed when reading/writing on a file,
for example.

Modifications:

Use PlatformDependent.copyMemory() to avoid the need for the temp ByteBuffer

Result:

No temp ByteBuffer allocated and GCed.
2015-10-19 22:24:07 +02:00
..
main/java/io/netty/buffer In (Pooled|Unpooled)UnsafeDirectByteBuf copy memory directly to and from ByteBuffer 2015-10-19 22:24:07 +02:00
test/java/io/netty/buffer Minimize reference count checks in SlicedByteBuf 2015-10-16 21:09:03 +02:00