From 28b7e42e44a1a77218a941d9dfe5bb643d884219 Mon Sep 17 00:00:00 2001 From: Jason Evans Date: Fri, 4 Nov 2016 15:00:08 -0700 Subject: 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.). --- src/arena.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/arena.c b/src/arena.c index 43c3ccf..d737ec9 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) -- cgit v0.12