<div>Hi,</div><div><br></div><div>I believe it's mentioned here:</div><div><br></div><a href="https://ghc.haskell.org/trac/ghc/wiki/Commentary/Rts/Storage/GC/RememberedSets">https://ghc.haskell.org/trac/ghc/wiki/Commentary/Rts/Storage/GC/RememberedSets</a><div><br></div><div>Regards,</div><div>Shao Cheng<br><br><div class="gmail_quote"><div dir="ltr">On Fri, Jan 18, 2019, 12:34 PM chessai . <<a href="mailto:chessai1996@gmail.com">chessai1996@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="auto">Ryan,<div dir="auto"><br></div><div dir="auto">That makes perfect sense, thanks. Is that documented explicitly anywhere? If not, I'd like to add the documentation to any place relevant.</div><div dir="auto"><br></div><div dir="auto">Thanks</div></div><br><div class="gmail_quote"><div dir="ltr">On Thu, Jan 17, 2019, 8:19 PM Ryan Yates <<a href="mailto:fryguybob@gmail.com" target="_blank">fryguybob@gmail.com</a> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div dir="ltr">Hi,<div><br></div><div>Because GHC's GC is generational it needs a way to handle heap objects from older generations that point into younger generations. This only happens when an older object is mutated to point to a younger object. GHC solves this by invoking the GC write barrier (not to be confused with write barriers for memory synchronization) `dirty_MUT_VAR`. This will add that mutable object to a mutable list that will be traversed in minor GCs along with young generation roots. Additionally the write barrier will mark the heap object as "dirty" to avoid adding it to the list more than once.</div><div><br></div><div>Ryan</div></div></div><br><div class="gmail_quote"><div dir="ltr">On Thu, Jan 17, 2019 at 4:29 PM chessai . <<a href="mailto:chessai1996@gmail.com" rel="noreferrer" target="_blank">chessai1996@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="auto">Devs,<div dir="auto"><br></div><div dir="auto">I've heard from a few friends that MutVars, TVars, etc. are more challenging for the garbage collector. I'm writing to ask if someone can answer: 1. Is this true, and 2: Why? I can't seem to find anything like a writeup or documentation that mentions this. The HeapObjects trac page also mentions nothing about these supposed difficulties that GC faces with mutable heap objects.</div><div dir="auto"><br></div><div dir="auto">Thanks</div></div>
_______________________________________________<br>
ghc-devs mailing list<br>
<a href="mailto:ghc-devs@haskell.org" rel="noreferrer" target="_blank">ghc-devs@haskell.org</a><br>
<a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs" rel="noreferrer noreferrer" target="_blank">http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs</a><br>
</blockquote></div>
</blockquote></div>
_______________________________________________<br>
ghc-devs mailing list<br>
<a href="mailto:ghc-devs@haskell.org" target="_blank">ghc-devs@haskell.org</a><br>
<a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs" rel="noreferrer" target="_blank">http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs</a><br>
</blockquote></div></div>