Previously MiniHeap::bytesFree was reporting the bytes allocated, not the bytes free. This was impacting GlobalHeap::allocSmallMiniheaps which was always seeing bytesFree() return 0, and thus was always allocating the maximum number of MiniHeaps instead of stopping at bytesFree >= kMiniheapRefillGoalSize
Previously
MiniHeap::bytesFree
was reporting the bytes allocated, not the bytes free. This was impactingGlobalHeap::allocSmallMiniheaps
which was always seeingbytesFree()
return 0, and thus was always allocating the maximum number of MiniHeaps instead of stopping atbytesFree >= kMiniheapRefillGoalSize