mirror of
https://github.com/jemalloc/jemalloc.git
synced 2026-07-22 04:03:11 +00:00
Update a0's oversize threshold regardless whether huge arena is enabled or not.
This commit is contained in:
committed by
lexprfuncall
parent
70b228dece
commit
ee4d7b7f9a
@@ -1954,9 +1954,6 @@ arena_init_huge(tsdn_t *tsdn, arena_t *a0) {
|
||||
huge_arena_ind = narenas_total_get();
|
||||
assert(huge_arena_ind != 0);
|
||||
oversize_threshold = opt_oversize_threshold;
|
||||
/* a0 init happened before malloc_conf_init. */
|
||||
atomic_store_zu(&a0->pa_shard.pac.oversize_threshold,
|
||||
oversize_threshold, ATOMIC_RELAXED);
|
||||
/* Initialize huge_arena_pac_thp fields. */
|
||||
base_t *b0 = a0->base;
|
||||
/* Make sure that b0 thp auto-switch won't happen concurrently here. */
|
||||
@@ -1974,6 +1971,10 @@ arena_init_huge(tsdn_t *tsdn, arena_t *a0) {
|
||||
huge_enabled = true;
|
||||
}
|
||||
|
||||
/* a0 init happened before malloc_conf_init. */
|
||||
atomic_store_zu(&a0->pa_shard.pac.oversize_threshold,
|
||||
oversize_threshold, ATOMIC_RELAXED);
|
||||
|
||||
return huge_enabled;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user