<div dir="ltr">Hi, I'm reading the O'Reilly book on Erlang and I found this paragraph in it:<div><br></div><div>
                
        
        
                <p><span style="font-size:10pt;font-family:Birka">The garbage collector is also </span><span style="font-size:10pt;font-family:Birka;font-style:italic">generational, </span><span style="font-size:10pt;font-family:Birka">meaning that it has several generations of
the heap (in Erlang’s </span><span style="font-family:Birka;font-size:10pt">case, two). A garbage collection can be shallow or deep. A shallow
garbage collection looks only </span><span style="font-family:Birka;font-size:10pt">at data in the youngest generation; all data that survives
three shallow garbage collections will be </span><span style="font-family:Birka;font-size:10pt">moved to the old generation. A deep garbage
collection will occur only when a shallow collection fails </span><span style="font-family:Birka;font-size:10pt">to recycle enough memory or
after a (VM version dependent) number of shallow collections. </span></p></div><div><br></div><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></div>