plasma-umass / Mesh

A memory allocator that automatically reduces the memory footprint of C/C++ applications.
Apache License 2.0
1.75k stars 73 forks source link

Miniheap pairs are not properly checked for isMeshingCandidate() #63

Closed Corillian closed 5 years ago

Corillian commented 5 years ago

While meshing all size classes the meshFound callback only checks one of the miniheaps for each miniheap pair if it is a meshing candidate.

https://github.com/plasma-umass/Mesh/blob/65246837fc06dfce5c518fc77e17990bcf5c18da/src/global_heap.cc#L253

should be:

if (std::get<0>(miniheaps)->isMeshingCandidate() && std::get<1>(miniheaps)->isMeshingCandidate())
bpowers commented 5 years ago

wow, great find. It looks like I fat-fingered this in a refactor at the end of 2017: https://github.com/plasma-umass/Mesh/commit/816ba1f043f47f7149fac3856fa6bb239532b104#diff-5e53b77d66403f5bb04fab8563dc8e80L394-L396

bpowers commented 5 years ago

thanks @Corillian ! amazing find