From b82a6ebb4a8ce1a9af1a4b46263180dc3cfc2517 Mon Sep 17 00:00:00 2001 From: michalbiesek Date: Sat, 20 Jun 2020 17:54:46 +0200 Subject: [PATCH] Add used_pmem_memory_mutex - according to comment in atomic_var.h: "The variable 'var' should also have a declared mutex with the same name and the "_mutex" postfix" --- src/zmalloc.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/zmalloc.c b/src/zmalloc.c index e204655d8c1..e61d9342d22 100644 --- a/src/zmalloc.c +++ b/src/zmalloc.c @@ -150,6 +150,7 @@ static size_t pmem_threshold = UINT_MAX; static size_t used_memory = 0; static size_t used_pmem_memory = 0; pthread_mutex_t used_memory_mutex = PTHREAD_MUTEX_INITIALIZER; +pthread_mutex_t used_pmem_memory_mutex = PTHREAD_MUTEX_INITIALIZER; static void zmalloc_default_oom(size_t size) { fprintf(stderr, "zmalloc: Out of memory trying to allocate %zu bytes\n",