Hacker News new | ask | show | jobs
by openasocket 3120 days ago
Again, the term "stop the world" is misleading, there are a variety of compaction strategies that greatly minimize locking. There are even realtime GC implementations for the JVM.

Erlang's solution is interesting, but remember in Erlang processes can't share memory, they only have message passing. So you never have to worry about multiple threads writing to the same data structure at once, which is what makes compaction hard.

1 comments

Sure they can. There’s a separate shared heap which uses atomic ref counting.