mimalloc
mimalloc copied to clipboard
memory leak in mi_thread_data_zalloc
td->memid will be cleared by _mi_memzero_aligned before the function returns. So that td will not be correctly freed in mi_thread_data_free.
Yikes! Thanks for the report -- I just pushed a fix.
Recently, I tested alloc-test with mimalloc-v1.8.2, also notice memory leak for multi-thread, then I checkout to dev branch which has this issue addressed, the test result seem ok now. FYI I attached some results, the test just make alloc-test main() as a loop forever, each round we could get the (RSS max<<12)/allocatedMax。I hope someone knowing what I am talking about.... and I hope it is helpful
mimalloc-v1.8.2:
mimalloc-dev: