From 4d7c3d0f2e6af0d58f6daa902fe5425ec47b0c19 Mon Sep 17 00:00:00 2001 From: Moritz Hoffmann Date: Wed, 22 Nov 2023 19:58:42 -0500 Subject: [PATCH] Only retain two allocations This fixes retaining memory as large as the output when sealing the merge batcher for columnation. Signed-off-by: Moritz Hoffmann --- src/trace/implementations/merge_batcher_col.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/trace/implementations/merge_batcher_col.rs b/src/trace/implementations/merge_batcher_col.rs index 3b1d5eaec..961cfa186 100644 --- a/src/trace/implementations/merge_batcher_col.rs +++ b/src/trace/implementations/merge_batcher_col.rs @@ -203,7 +203,7 @@ impl) { - if buffer.capacity() == Self::buffer_size() { + if buffer.capacity() == Self::buffer_size() && self.stash.len() <= 2 { buffer.clear(); self.stash.push(buffer); }