Changes between Version 1 and Version 2 of Commentary/Rts/Storage/GC/Roots


Ignore:
Timestamp:
Dec 7, 2009 2:55:10 PM (5 years ago)
Author:
simonmar
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Commentary/Rts/Storage/GC/Roots

    v1 v2  
    55The "roots" are the set of pointers that the GC starts traversing from, i.e. the roots of the live object graph. 
    66 
    7 In GHC, there are no global roots, all roots belong to a particular Capability.  Traversing the roots of a capbility is done by `markSomeCapabilities()` in [[GhcFile(rts/Capability.c)]].  The roots of a Capability are: 
     7Most roots belong to a particular Capability.  Traversing the roots of a capbility is done by `markSomeCapabilities()` in [[GhcFile(rts/Capability.c)]].  The roots of a Capability are: 
    88 
    99 * The run queue (head and tail) 
     
    1515In addition, each Capability has a [wiki:Commentary/Rts/Storage/GC/RememberedSets remembered set] for each generation.  A remembered set is a source of roots if that generation is ''not'' being collected during this cycle; otherwise the remembered set is discarded.  During GC, all remembered sets are discarded and new ones will be constructed for each generation and Capability; see `scavenge_capability_mut_lists()` in [[GhcFile(rts/sm/Scav.c)]]. 
    1616 
     17There are also roots from other parts of the system: 
    1718 
     19 * Signal handlers (only in the non-threaded RTS; in the threaded RTS signal handlers are maintained by the IO manager in `GHC.Conc` rather than the RTS). 
     20 * [wiki:Commentary/Rts/Storage/GC/Weak Weak pointers] 
     21 * [wiki:Commentary/Rts/Stable Stable pointers] 
     22 
     23