summaryrefslogtreecommitdiffstats
path: root/src/arena.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/arena.c')
-rw-r--r--src/arena.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/arena.c b/src/arena.c
index 105d60c..de50d8c 100644
--- a/src/arena.c
+++ b/src/arena.c
@@ -2001,14 +2001,15 @@ arena_new(tsdn_t *tsdn, unsigned ind, extent_hooks_t *extent_hooks) {
goto label_error;
}
- if (opt_retain) {
- atomic_store_u(&arena->extent_grow_next, psz2ind(HUGEPAGE),
- ATOMIC_RELAXED);
+ arena->extent_grow_next = psz2ind(HUGEPAGE);
+ if (malloc_mutex_init(&arena->extent_grow_mtx, "extent_grow",
+ WITNESS_RANK_EXTENT_GROW, malloc_mutex_rank_exclusive)) {
+ goto label_error;
}
extent_avail_new(&arena->extent_avail);
if (malloc_mutex_init(&arena->extent_avail_mtx, "extent_avail",
- WITNESS_RANK_EXTENT_FREELIST, malloc_mutex_rank_exclusive)) {
+ WITNESS_RANK_EXTENT_AVAIL, malloc_mutex_rank_exclusive)) {
goto label_error;
}