aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorJason Evans <jasone@canonware.com>2016-11-11 22:15:27 -0800
committerJason Evans <jasone@canonware.com>2016-11-11 22:19:10 -0800
commita2af09f0253769cb08656ae8828a3d70123ce5bd (patch)
tree90168fb1be3ea5a8f445c5c300d95d3c9b7b2ac6 /include
parentb9408d77a63a54fd331f9b81c884f68e6d57f2e5 (diff)
downloadjemalloc-a2af09f0253769cb08656ae8828a3d70123ce5bd.tar.gz
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.
Diffstat (limited to 'include')
-rw-r--r--include/jemalloc/internal/stats.h8
1 files changed, 2 insertions, 6 deletions
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 @@ stats_cactive_get(void)
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