From 97bda377388e0ab42efe59f46039e01cd8ac1f7d Mon Sep 17 00:00:00 2001 From: Moritz Hoffmann Date: Wed, 22 Nov 2023 20:09:14 -0500 Subject: [PATCH] Only retain two allocations (#425) 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); }