From 28ac68d46a0138812b57d5c7739d0383938d2951 Mon Sep 17 00:00:00 2001 From: Andrew Noyes Date: Thu, 18 Jan 2024 17:48:25 -0800 Subject: [PATCH] Allocate write array with arena --- ConflictSet.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ConflictSet.cpp b/ConflictSet.cpp index f1462e4..58f7c45 100644 --- a/ConflictSet.cpp +++ b/ConflictSet.cpp @@ -788,9 +788,9 @@ ConflictSet &ConflictSet::operator=(ConflictSet &&other) noexcept { int main(void) { int64_t writeVersion = 0; ConflictSet::Impl cs{writeVersion}; - constexpr int kNumKeys = 5; - ConflictSet::WriteRange write[kNumKeys]; Arena arena; + constexpr int kNumKeys = 100; + auto *write = new (arena) ConflictSet::WriteRange[kNumKeys]; for (int i = 0; i < kNumKeys; ++i) { write[i].begin = toKey(arena, i); write[i].end.len = 0;