mirror of
https://github.com/jemalloc/jemalloc.git
synced 2026-04-14 22:51:50 +03: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:
parent
77635bf532
commit
28b7e42e44
1 changed files with 2 additions and 2 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue