[erlang-questions] Erlang and Memory management
Wed Jun 1 09:20:54 CEST 2011
On Tue, May 31, 2011 at 5:01 PM, Jack Moffitt <> wrote:
> Could you elaborate a bit on the reason why you'd prefer a shared
> heap? I was under the impression that individual heaps were one of the
> ways Erlang achieved soft real-time performance. Is CPU power enough
> improved (or garbage collectors) since Erlang made that decision that
> it's no longer worth it?
Erlang has to copy terms whenever they're sent in a message, aside from the
exceptions noted earlier regarding binaries. With a shared heap, sending
messages could be done by reference instead of actually copying data between
There are realtime (and even hard realtime) garbage collectors in the Java
world which use a shared heap. Azul systems with 768 cores and 500GB+ heaps
managed to keep GC pauses in the 10-20ms range, albeit with hardware memory
barriers. Perhaps commodity x64 chips will get them at some point in the
future as the number of CPU cores continues to grow.
Shared heaps can scale well and eliminate the need to copy data on message
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the erlang-questions