mirror of
https://github.com/jemalloc/jemalloc.git
synced 2026-07-22 04:03:11 +00:00
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 by5d8db15db9(Simplify run quantization.), which in turn fixed an over-allocation regression caused by3c4d92e82a(Add per size class huge allocation statistics.).
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user