News for hackers. Stuff that matters.
Re:Erlang vs Java memory architecture by hassy on Wednesday April 13, 2011 @08:45AM (#2441897)
The GC in Erlang VM is also per-process which allows it to be soft real-time. An application can be using gigabytes of memory, but it it's split between thousands of processes, garbage collection can be very very fast because the GC only needs to work through a small heap at a time.
Re:Erlang vs Java memory architecture by silentbicycle on Wednesday April 13, 2011 @10:56AM (#2442502)
You can also measure the amount of memory a process tends to use in typical operation, then spawn it with an appropriately sized heap. It never needs to do GC at all, it just dies and frees its heap when complete. Look at min_heap_size in spawn_opt/* .

It's the same concept as giving a copying garbage collector really large subspaces - GC only happens when one fills. Giving each process its own heap means that the GC pauses will still be brief.

Re:Erlang vs Java memory architecture by mononcqc on Wednesday April 13, 2011 @10:45AM (#2442448)
And to my understanding it can be done on processes not currently scheduled so there is very little visible impact.