Changes between Version 1 and Version 2 of Commentary/Rts/Storage/CAFs


Ignore:
Timestamp:
Oct 5, 2009 11:07:12 PM (5 years ago)
Author:
diatchki
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Commentary/Rts/Storage/CAFs

    v1 v2  
    22 
    33= GHC Commentary: Garbage Collecting CAFs = 
     4 
     5Files: [[GhcFile(rts/sm/GC.c)]] 
     6 
     7Constant Applicative Forms, or CAFs for short, are top-level values defined in a program.  
     8To avoid memory leaks cause by CAFs we need to detect when all values/functions that could potentially refer to a CAF are gone, and so it is safe to deallocate the CAF.   
     9 
     10To achieve this, during GC we maintain a linked list of static objects that are still live. 
     11Closure that might refer to CAFs contains a Satic Reference Table (SRT) which indicates what 
     12CAFs are still in use by this closure.