<div class="gmail_quote">On Tue, May 31, 2011 at 5:01 PM, Jack Moffitt <span dir="ltr"><<a href="mailto:jack@metajack.im">jack@metajack.im</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

<div class="im">Could you elaborate a bit on the reason why you'd prefer a shared</div>
heap? I was under the impression that individual heaps were one of the<br>
ways Erlang achieved soft real-time performance. Is CPU power enough<br>
improved (or garbage collectors) since Erlang made that decision that<br>
it's no longer worth it?</blockquote><div><br></div><div>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 process heaps.</div>

<div><br></div><div>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.</div>

</div><div><br></div><div>Shared heaps can scale well and eliminate the need to copy data on message sends.</div><br>--<br>Tony Arcieri<br><br>