From f743690739299cb1e72852744bdd79443b264be0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Amaury=20S=C3=A9chet?= Date: Fri, 10 Mar 2023 09:12:15 +0000 Subject: [PATCH] Remove unused mutex from hpa_central --- include/jemalloc/internal/hpa.h | 5 ----- src/hpa.c | 6 +----- 2 files changed, 1 insertion(+), 10 deletions(-) diff --git a/include/jemalloc/internal/hpa.h b/include/jemalloc/internal/hpa.h index f3562853..0b3c76c6 100644 --- a/include/jemalloc/internal/hpa.h +++ b/include/jemalloc/internal/hpa.h @@ -9,11 +9,6 @@ typedef struct hpa_central_s hpa_central_t; struct hpa_central_s { - /* - * The mutex guarding most of the operations on the central data - * structure. - */ - malloc_mutex_t mtx; /* * Guards expansion of eden. We separate this from the regular mutex so * that cheaper operations can still continue while we're doing the OS diff --git a/src/hpa.c b/src/hpa.c index 7e2aeba0..8ebb2db2 100644 --- a/src/hpa.c +++ b/src/hpa.c @@ -68,11 +68,7 @@ hpa_central_init(hpa_central_t *central, base_t *base, const hpa_hooks_t *hooks) if (err) { return true; } - err = malloc_mutex_init(¢ral->mtx, "hpa_central", - WITNESS_RANK_HPA_CENTRAL, malloc_mutex_rank_exclusive); - if (err) { - return true; - } + central->base = base; central->eden = NULL; central->eden_len = 0;