I'm learning Elixir and want to be sure I understand how garbage collection works in the Erlang VM.
My understanding is this:
- Each VM-level process has its own heap
- If that heap doesn't fill up before it terminates, it's discarded with the process and no GC is needed
- Heaps that do fill up are garbage collected individually, in parallel, so GC doesn't "stop the world", just that one process
Is this correct?
Evan Miller, creator of the popular Chicago Boss framework.
So I believe erlang garbage collects concurrently, that is, the various heaps are garbage collected independently of one another. Whether there is any parallelization depends on whether your node is running on multiple cores or not, but if so then the garbage collection is done in parallel, yes.