netty5/buffer
Rolandz 89639ce322 Fix offset calculation in PooledByteBufAllocator when used
Motivation:

When we create new chunk with memory aligned, the offset of direct memory should be
'alignment - address & (alignment - 1)', not just 'address & (alignment - 1)'.

Modification:

Change offset calculating formula to offset = alignment - address & (alignment - 1) in PoolArena.DirectArena#offsetCacheLine and add a unit test to assert that.

Result:

Correctly calculate offset.
2018-11-27 11:47:34 +01:00
..
src Fix offset calculation in PooledByteBufAllocator when used 2018-11-27 11:47:34 +01:00
pom.xml [maven-release-plugin] prepare for next development iteration 2018-10-29 15:38:51 +00:00