diff --git a/src/mini_heap.h b/src/mini_heap.h index a480b22..9d1639a 100644 --- a/src/mini_heap.h +++ b/src/mini_heap.h @@ -281,7 +281,7 @@ class MiniHeap { } inline size_t bytesFree() const { - return inUseCount() * objectSize(); + return (maxCount() - inUseCount()) * objectSize(); } inline void setMeshed() {