diff options
| author | Jason Evans <jasone@canonware.com> | 2016-11-12 06:15:27 (GMT) |
|---|---|---|
| committer | Jason Evans <jasone@canonware.com> | 2016-11-12 06:19:10 (GMT) |
| commit | a2af09f0253769cb08656ae8828a3d70123ce5bd (patch) | |
| tree | 90168fb1be3ea5a8f445c5c300d95d3c9b7b2ac6 | |
| parent | b9408d77a63a54fd331f9b81c884f68e6d57f2e5 (diff) | |
| download | jemalloc-a2af09f0253769cb08656ae8828a3d70123ce5bd.zip jemalloc-a2af09f0253769cb08656ae8828a3d70123ce5bd.tar.gz jemalloc-a2af09f0253769cb08656ae8828a3d70123ce5bd.tar.bz2 | |
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.
| -rw-r--r-- | include/jemalloc/internal/stats.h | 8 |
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 |
