mirror of
https://github.com/jemalloc/jemalloc.git
synced 2026-04-30 00:58:02 +03:00
Update a0's oversize threshold regardless whether huge arena is enabled or not.
This commit is contained in:
parent
70b228dece
commit
ee4d7b7f9a
1 changed files with 4 additions and 3 deletions
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue