From 8e0e65dac6d66db09e0429025da258fb8bbedf35 Mon Sep 17 00:00:00 2001 From: Andrew Noyes Date: Mon, 18 Mar 2024 11:42:53 -0700 Subject: [PATCH] Count implicit key byte for maybeDecreaseCapacity --- ConflictSet.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ConflictSet.cpp b/ConflictSet.cpp index be05a46..155c27d 100644 --- a/ConflictSet.cpp +++ b/ConflictSet.cpp @@ -1078,7 +1078,7 @@ void freeAndMakeCapacityAtLeast(Node *&self, int capacity, void maybeDecreaseCapacity(Node *&self, NodeAllocators *allocators, ConflictSet::Impl *impl) { const int maxCapacity = - (self->numChildren + int(self->entryPresent)) * self->partialKeyLen; + (self->numChildren + int(self->entryPresent)) * (self->partialKeyLen + 1); if (self->getCapacity() <= maxCapacity) { return; }