diff options
author | Jason Evans <jasone@canonware.com> | 2016-11-04 15:00:08 -0700 |
---|---|---|
committer | Jason Evans <jasone@canonware.com> | 2016-11-04 15:00:08 -0700 |
commit | 28b7e42e44a1a77218a941d9dfe5bb643d884219 (patch) | |
tree | 649ac10a6fdfe9b0bd13461cd7cf42bff65b91af | |
parent | 77635bf532488b180024ef50c0583e43111fee0f (diff) | |
download | jemalloc-28b7e42e44a1a77218a941d9dfe5bb643d884219.tar.gz |
Fix arena data structure size calculation.
Fix paren placement so that QUANTUM_CEILING() applies to the correct
portion of the expression that computes how much memory to base_alloc().
In practice this bug had no impact. This was caused by
5d8db15db91c85d47b343cfc07fc6ea736f0de48 (Simplify run quantization.),
which in turn fixed an over-allocation regression caused by
3c4d92e82a31f652a7c77ca937a02d0185085b06 (Add per size class huge
allocation statistics.).
-rw-r--r-- | src/arena.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/arena.c b/src/arena.c index 43c3ccf2..d737ec9a 100644 --- a/src/arena.c +++ b/src/arena.c @@ -3461,8 +3461,8 @@ arena_new(tsdn_t *tsdn, unsigned ind) if (config_stats) { arena = (arena_t *)base_alloc(tsdn, CACHELINE_CEILING(sizeof(arena_t)) + - QUANTUM_CEILING((nlclasses * sizeof(malloc_large_stats_t)) + - (nhclasses * sizeof(malloc_huge_stats_t)))); + QUANTUM_CEILING((nlclasses * sizeof(malloc_large_stats_t))) + + (nhclasses * sizeof(malloc_huge_stats_t))); } else arena = (arena_t *)base_alloc(tsdn, sizeof(arena_t)); if (arena == NULL) |