new syntax - a provocation

Joachim Durchholz joachim.durchholz@REDACTED
Sun Oct 19 01:59:23 CEST 2003

Robert Virding wrote:
> It is not inherently difficult to garbage atom tables! The reason that it is
> difficult to collect atoms in the BEAM/JAM is because of the per process
> heaps. If you use a single heap implementation (with an truly incremental
> collector) then collecting the atom table is trivial. I KNOW because I
> have done it.

Making an incremental collector right isn't a trivial task:
1. Write it. There's quite some code involved.
2. Make it right. Not too easy either.
3. Make it fast. This can take up an arbitrary amount of time (the Boehm 
collector took several years to get to its current-day speed).
4. Find all the pathological allocation patterns that cause it to 
degenerate into polynomial or exponential behaviour. (This happened to 
the ISE Eiffel run-time - near-verbatim quote from the technical lead: 
"it's galling to do one's very best to make the best ever garbage 
collector conceivable, just to be proven wrong by a pathological case.")

Erlang uses a stop-the-world collector, and it can get away with that 
because it uses that collector on a per-process basis. (I'm wondering 
when a process GC is triggered though... if GC is triggered by 
out-of-memory, this would trigger GC in all processes... so how does 
Erlang avoid this?


More information about the erlang-questions mailing list