From e28b43a739b841c0ca7b0c0e3faf46e40bfc4616 Mon Sep 17 00:00:00 2001 From: Jason Evans Date: Wed, 1 Jun 2016 16:24:49 -0700 Subject: [PATCH] Remove some unnecessary locking. --- src/large.c | 22 ++-------------------- 1 file changed, 2 insertions(+), 20 deletions(-) diff --git a/src/large.c b/src/large.c index 60a0745e..952d4644 100644 --- a/src/large.c +++ b/src/large.c @@ -310,40 +310,22 @@ large_dalloc(tsdn_t *tsdn, extent_t *extent) size_t large_salloc(tsdn_t *tsdn, const extent_t *extent) { - size_t usize; - arena_t *arena; - arena = extent_arena_get(extent); - malloc_mutex_lock(tsdn, &arena->large_mtx); - usize = extent_usize_get(extent); - malloc_mutex_unlock(tsdn, &arena->large_mtx); - - return (usize); + return (extent_usize_get(extent)); } prof_tctx_t * large_prof_tctx_get(tsdn_t *tsdn, const extent_t *extent) { - prof_tctx_t *tctx; - arena_t *arena; - arena = extent_arena_get(extent); - malloc_mutex_lock(tsdn, &arena->large_mtx); - tctx = extent_prof_tctx_get(extent); - malloc_mutex_unlock(tsdn, &arena->large_mtx); - - return (tctx); + return (extent_prof_tctx_get(extent)); } void large_prof_tctx_set(tsdn_t *tsdn, extent_t *extent, prof_tctx_t *tctx) { - arena_t *arena; - arena = extent_arena_get(extent); - malloc_mutex_lock(tsdn, &arena->large_mtx); extent_prof_tctx_set(extent, tctx); - malloc_mutex_unlock(tsdn, &arena->large_mtx); } void