Skip to content

Commit

Permalink
Fix definition of MiniHeap::bytesFree (#106)
Browse files Browse the repository at this point in the history
  • Loading branch information
aneeshdurg authored Apr 27, 2024
1 parent 0d42366 commit c942f82
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/mini_heap.h
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ class MiniHeap {
}

inline size_t bytesFree() const {
return inUseCount() * objectSize();
return (maxCount() - inUseCount()) * objectSize();
}

inline void setMeshed() {
Expand Down

0 comments on commit c942f82

Please sign in to comment.