From dd76bdb5e28567b9ba156dff65ae30e7f2022a1b Mon Sep 17 00:00:00 2001 From: Johannes Herrmann Date: Tue, 15 Oct 2024 13:12:14 +0200 Subject: [PATCH] Added allocators to visited and path cache --- src/engine/PathSearch.cpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/engine/PathSearch.cpp b/src/engine/PathSearch.cpp index f953e44857..ae86ba1c9c 100644 --- a/src/engine/PathSearch.cpp +++ b/src/engine/PathSearch.cpp @@ -5,6 +5,7 @@ #include "PathSearch.h" #include +#include #include #include #include @@ -14,6 +15,7 @@ #include "engine/CallFixedSize.h" #include "engine/QueryExecutionTree.h" #include "engine/VariableToColumnMap.h" +#include "util/AllocatorWithLimit.h" using namespace pathSearch; @@ -305,9 +307,14 @@ PathsLimited PathSearch::findPaths(const Id& source, const BinSearchWrapper& binSearch) const { std::vector edgeStack; Path currentPath{EdgesLimited(allocator())}; - std::unordered_map> pathCache; + std::unordered_map< + uint64_t, PathsLimited, std::hash, std::equal_to, + ad_utility::AllocatorWithLimit>> + pathCache{allocator()}; PathsLimited result{allocator()}; - std::unordered_set visited; + std::unordered_set, std::equal_to, + ad_utility::AllocatorWithLimit> + visited{allocator()}; visited.insert(source.getBits()); for (auto edge : binSearch.outgoingEdes(source)) {