diff --git a/include/contractor/contractor_heap.hpp b/include/contractor/contractor_heap.hpp index fc581f3b0..77a0a85af 100644 --- a/include/contractor/contractor_heap.hpp +++ b/include/contractor/contractor_heap.hpp @@ -20,7 +20,8 @@ using ContractorHeap = util::QueryHeap>; + util::XORFastHashStorage, + false>; } // namespace osrm::contractor diff --git a/include/util/pool_allocator.hpp b/include/util/pool_allocator.hpp index 7d6e03714..9789e26e1 100644 --- a/include/util/pool_allocator.hpp +++ b/include/util/pool_allocator.hpp @@ -23,13 +23,12 @@ class MemoryManager public: static MemoryManager &instance() { - thread_local MemoryManager instance; + static thread_local MemoryManager instance; return instance; } T *allocate(std::size_t n) { - std::lock_guard lock(mutex_); size_t free_list_index = get_next_power_of_two_exponent(n); auto &free_list = free_lists_[free_list_index]; const auto items_in_block = 1u << free_list_index; @@ -52,7 +51,6 @@ public: void deallocate(T *p, std::size_t n) noexcept { - std::lock_guard lock(mutex_); size_t free_list_index = get_next_power_of_two_exponent(n); free_lists_[free_list_index].push_back(p); } @@ -66,8 +64,6 @@ public: } private: - std::mutex mutex_; - MemoryManager() = default; MemoryManager(const MemoryManager &) = delete; MemoryManager &operator=(const MemoryManager &) = delete;