From 6934a6dbf2948b0d9f19613cfa84ee9c02f6e654 Mon Sep 17 00:00:00 2001 From: iwabuchi Date: Mon, 27 Nov 2023 18:38:30 -0800 Subject: [PATCH] Bugfix in freeing object cache data --- include/metall/kernel/object_cache.hpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/include/metall/kernel/object_cache.hpp b/include/metall/kernel/object_cache.hpp index 23ac3aa8..6bf08848 100644 --- a/include/metall/kernel/object_cache.hpp +++ b/include/metall/kernel/object_cache.hpp @@ -544,6 +544,10 @@ class object_cache { } private: + struct free_deleter { + void operator()(void *const p) const noexcept { std::free(p); } + }; + inline static unsigned int priv_get_num_cpus() { return mdtl::get_num_cpus(); } @@ -755,7 +759,7 @@ class object_cache { #ifdef METALL_ENABLE_MUTEX_IN_OBJECT_CACHE std::vector m_mutex; #endif - std::unique_ptr m_cache{nullptr}; + std::unique_ptr m_cache{nullptr}; }; // const_bin_iterator