Share kStackAllocThreshold

This commit is contained in:
2024-06-03 22:35:49 -07:00
parent b92f0ec227
commit 118071e3e9

View File

@@ -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;