netty5/buffer/src
Norman Maurer 221c1a1ed7
Fix caching for normal allocations (#10825)
Motivation:

https://github.com/netty/netty/pull/10267 introduced a change that reduced the fragmentation. Unfortunally it also introduced a regression when it comes to caching of normal allocations. This can have a negative performance impact depending on the allocation sizes.

Modifications:

- Fix algorithm to calculate the array size for normal allocation caches
- Correctly calculate indeox for normal caches
- Add unit test

Result:

Fixes https://github.com/netty/netty/issues/10805
2020-11-25 15:05:30 +01:00
..
main Fix caching for normal allocations (#10825) 2020-11-25 15:05:30 +01:00
test/java/io/netty/buffer Fix caching for normal allocations (#10825) 2020-11-25 15:05:30 +01:00