[Haskell-cafe] Re: space leak with 'concat' ?
marlowsd at gmail.com
Thu Feb 12 04:36:55 EST 2009
Peter Verswyvelen wrote:
> Yes, I was really surprised that this was the case. I while ago I did a
> little FRP experiment. I made a top level binding to a list of timer
> event occurrences. The list was generated on another thread. To my
> surprise, I did not have space leak, which is amazingly cool, but it
> felt odd :) Is it documented when GHC will garbage collect CAFs?
CAFs are garbage collected when they are unreachable by traversing the code
that is reachable from the currently running program. In practice we don't
actually traverse the code, instead we have these "static reference tables"
that list the top-level closures referenced by each code block, and
traverse those instead.
Unfortunately we didn't get around to documenting the details of how this
More information about the Haskell-Cafe