Remove overly restrictive stats_cactive_{add,sub}() assertions.
This fixes a regression caused by
40ee9aa9577ea5eb6616c10b9e6b0fa7e6796821 (Fix stats.cactive accounting
regression.) and first released in 4.1.0.
diff --git a/include/jemalloc/internal/stats.h b/include/jemalloc/internal/stats.h
index b621817..04e7dae 100644
--- a/include/jemalloc/internal/stats.h
+++ b/include/jemalloc/internal/stats.h
@@ -175,25 +175,21 @@
JEMALLOC_INLINE void
stats_cactive_add(size_t size)
{
- UNUSED size_t cactive;
assert(size > 0);
assert((size & chunksize_mask) == 0);
- cactive = atomic_add_z(&stats_cactive, size);
- assert(cactive - size < cactive);
+ atomic_add_z(&stats_cactive, size);
}
JEMALLOC_INLINE void
stats_cactive_sub(size_t size)
{
- UNUSED size_t cactive;
assert(size > 0);
assert((size & chunksize_mask) == 0);
- cactive = atomic_sub_z(&stats_cactive, size);
- assert(cactive + size > cactive);
+ atomic_sub_z(&stats_cactive, size);
}
#endif