Count implicit key byte for maybeDecreaseCapacity
This commit is contained in:
@@ -1078,7 +1078,7 @@ void freeAndMakeCapacityAtLeast(Node *&self, int capacity,
|
|||||||
void maybeDecreaseCapacity(Node *&self, NodeAllocators *allocators,
|
void maybeDecreaseCapacity(Node *&self, NodeAllocators *allocators,
|
||||||
ConflictSet::Impl *impl) {
|
ConflictSet::Impl *impl) {
|
||||||
const int maxCapacity =
|
const int maxCapacity =
|
||||||
(self->numChildren + int(self->entryPresent)) * self->partialKeyLen;
|
(self->numChildren + int(self->entryPresent)) * (self->partialKeyLen + 1);
|
||||||
if (self->getCapacity() <= maxCapacity) {
|
if (self->getCapacity() <= maxCapacity) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user