Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This is a non-optimal solution. MMTK doesn't provide any kind of shutdown hook from what I can find and the heap walking implementation takes a snapshot of the heap, so it's problematic to run GC or mutator threads at the same time. I think a better solution would be to implement a shutdown mechanism inside MMTK core that can safely free everything, but I need to talk to Kunshan about how this is implemented. After this work `leaks` on macOS is still reporting ~20 leaks with `RUBY_FREE_AT_EXIT` enabled and ~200 without, some of these leaks are coming from within MMTk's allocators, and a few are still coming from the use of `realloc` inside Ruby. I suspect that we won't be able to clean up all of these without making changes to mmtk-core
- Loading branch information