netty5/buffer/src/main/java/io/netty
buchgr 35771dd1cd Fix race in PoolArena.allocate. Fixes #4829
Motivation:

The statistic counters PoolArena.(allocationsTiny|allocationsSmall) are
not protected by a per arena lock, but by a per size class lock. Thus,
two concurrent allocations of different size (class) could lead to a
race and ultimately to wrong statistics.

Modifications:

Use a thread-safe LongCounter instead of a plain long data type.

Result:

Fewer data races.
2016-03-14 08:57:46 +01:00
..
buffer Fix race in PoolArena.allocate. Fixes #4829 2016-03-14 08:57:46 +01:00