From 118071e3e9953b945622fe88c27954ff0f8f58f3 Mon Sep 17 00:00:00 2001 From: Andrew Noyes Date: Mon, 3 Jun 2024 22:35:49 -0700 Subject: [PATCH] Share kStackAllocThreshold --- VersionedMap.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/VersionedMap.cpp b/VersionedMap.cpp index 92862b9..0559fd3 100644 --- a/VersionedMap.cpp +++ b/VersionedMap.cpp @@ -1297,6 +1297,8 @@ void VersionedMap::Impl::StepwiseFirstGeq::end() { loopEnd:; } +constexpr int kStackAllocThreshold = 2; + void VersionedMap::Impl::firstGeq(const weaselab::VersionedMap::Key *key, const int64_t *version, Iterator *iterator, int count) const { @@ -1306,7 +1308,6 @@ void VersionedMap::Impl::firstGeq(const weaselab::VersionedMap::Key *key, // Use stack allocation for small count Arena arena; - constexpr int kStackAllocThreshold = 2; StepwiseFirstGeq stepwiseStackAlloc[kStackAllocThreshold]; int nextJobStackAllocation[kStackAllocThreshold]; StepwiseFirstGeq *stepwise; @@ -1354,7 +1355,6 @@ void VersionedMap::Impl::firstGeq(const weaselab::VersionedMap::Key *key, // Use stack allocation for small count Arena arena; - constexpr int kStackAllocThreshold = 2; StepwiseFirstGeq stepwiseStackAlloc[kStackAllocThreshold]; int nextJobStackAllocation[kStackAllocThreshold]; StepwiseFirstGeq *stepwise;