<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>Is there a document (other than the source code) where one can find out about the GC internals. Not low level details, but more a general characteristics.</div><div>In particular, I'm interested how Erlang GC profits from memory isolation. I've seen claims that it works on a process level. Does it mean it runs separately for each scheduler (allowing other schedulers to work)?</div><div>Since processes are isolated, is a process memory immediately reclaimed after the process terminates?</div><br><div><div>On Aug 22, 2013, at 11:04 PM, Jesper Louis Andersen wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Aug 22, 2013 at 4:35 PM, Yves S. Garret <span dir="ltr"><<a href="mailto:yoursurrogategod@gmail.com" target="_blank">yoursurrogategod@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div>Am I understanding this correctly? You have two heaps and if a piece of memory keeps getting </div><div>referenced, it gets moved into the "old" heap and the "new" heap's memory gets freed up a little, </div>
<div>yes?</div></blockquote></div><br>Well the heap is divided in two regions, old and young. New data is allocated on the young heap. When it fills, the young heap is garbage collected. Data which is dead is removed and data which is still live survives on the young heap. When it has survived enough times (3) then it is promoted to the old heap.</div>
<div class="gmail_extra"><br></div><div class="gmail_extra">The reason for this scheme is that you keep the young heap small and collect it often. Collection is faster in a small heap. Also, since most objects tend to be used only once at most, they are usually dead when the young heap collects. Objects which survive are usually long lived, so they get promoted into the old heap. It is then collected more rarely.</div>
<div class="gmail_extra"><br></div><div class="gmail_extra">The view here is simplified, but it might do.<br></div></div>
_______________________________________________<br>erlang-questions mailing list<br><a href="mailto:erlang-questions@erlang.org">erlang-questions@erlang.org</a><br>http://erlang.org/mailman/listinfo/erlang-questions<br></blockquote></div><br></body></html>