From 451e6aeb6659343e11f7314b0dc6ee976d59f8cb Mon Sep 17 00:00:00 2001 From: Norman Maurer Date: Thu, 5 May 2016 20:54:08 +0200 Subject: [PATCH] [#5216] Correctly increment deallocationsHuge when call PoolArena.free Motivation: We called deallocationsHuge.decrement() but it needs to be increment() Modifications: Replace decrement() with increment() Result: Correct metrics. --- buffer/src/main/java/io/netty/buffer/PoolArena.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/buffer/src/main/java/io/netty/buffer/PoolArena.java b/buffer/src/main/java/io/netty/buffer/PoolArena.java index 1df94e493c..e667d936c0 100644 --- a/buffer/src/main/java/io/netty/buffer/PoolArena.java +++ b/buffer/src/main/java/io/netty/buffer/PoolArena.java @@ -254,7 +254,7 @@ abstract class PoolArena implements PoolArenaMetric { int size = chunk.chunkSize(); destroyChunk(chunk); activeBytesHuge.add(-size); - deallocationsHuge.decrement(); + deallocationsHuge.increment(); } else { SizeClass sizeClass = sizeClass(normCapacity); if (cache != null && cache.add(this, chunk, handle, normCapacity, sizeClass)) {