Changes between Version 6 and Version 7 of StgObjectTypes


Ignore:
Timestamp:
Jun 6, 2015 8:18:17 PM (4 years ago)
Author:
triple
Comment:

Fixed some typos

Legend:

Unmodified
Added
Removed
Modified
  • StgObjectTypes

    v6 v7  
    1919= Backward Pointers =
    2020
    21 Backwards pointers are the cause of much heartache in writing generational GCs. They are essential pointer from older generations to newer ones. If you think about it, such a thing should never really occur in a pure functional langauge since objects cannot be updated once created. While that is true in essence, backward pointers do arise in Haskell in the following cases
     21Backwards pointers are the cause of much heartache in writing generational GCs. They are essentially pointers from older generations to newer ones. If you think about it, such a thing should never really occur in a pure functional language, since objects cannot be updated once created. While that is true in essence, backward pointers do arise in Haskell in the following cases
    2222
    2323 * Thunk updation
     
    4646 * Free closures environment variables early
    4747 * Loop detection at runtime
    48  * Avoid re-evaluation of the same think by mutliple threads
     48 * Avoid re-evaluation of the same thunk by mutliple threads
    4949
    5050= Mutable List =
    51 The mutable list, sometimes referred to as the Remember Set is a list of pointer to objects in a generation that point to older generations. When a GC occurs till generation N, generations older than N are not traversed instead only the mutable lists of those generations are traversed to see what objects in the new generation are live because older generation objects point to them.
     51The mutable list, sometimes referred to as the Remember Set is a list of pointers to objects in a generation that point to older generations. When a GC occurs till generation N, generations older than N are not traversed. Instead only the mutable lists of those generations are traversed to see what objects in the new generation are alive, because older generation objects point to them.
    5252
    5353
    54 A mutable list per generation is maintained by each capability. When GC starts, these are swept into each generation’s mut_list member and are traversed later. When garbage collecting only till generation N, mut lists of generations <=N are ignored (freed up) since we know that we are going to walk all the objects in those generations anyway.
     54A mutable list per generation is maintained by each capability. When GC starts, these are swept into each generation’s mut_list member and are traversed later. When garbage collecting only till generation N, mut lists of generations <=N are ignored (freed up), since we know that we are going to walk all the objects in those generations anyway.
    5555
    5656Certain object like MUT_ARR_PTRS_CLEAN are always on the mut list. In the case of some objects, walking the mut list does not let us take the objects off the mut list. Such objects are added back to the mut list (done by recordMutableGen).
    5757
    58 Objects that can be “cleaned” are cleaned by the function scavenge_one(). By cleaning we mean that the object in question no longer points to a newer generation object. This can be done only by moving the newer generation objects up to the generation where the original object resides. Code that does this for an object like a THUNK would look like this -
     58Objects that can be “cleaned” are cleaned by the function scavenge_one(). By cleaning we mean that the object in question no longer points to a newer generation object. This can be done only by moving the newer generation objects up to the generation, where the original object resides. Code that does this for an object like a THUNK would look like this -
    5959
    6060{{{
     
    6565}}}
    6666
    67 Objects referred to in the newer generation are moved intot the older generation by setting the evac_gen global and calling the evacuate() function.
     67Objects referred to in the newer generation are moved into the older generation by setting the evac_gen global and calling the evacuate() function.
    6868
    6969----
    7070Questions
    7171
    72  * Why is MUT_ARR_PTRS_CLEAN exist in the mut list always ?
     72 * Why does MUT_ARR_PTRS_CLEAN always exist in the mut list?
    7373 * Why is failed_to_evac a global?
    7474 * Why do the steps get scavenged immediately after mut_list is scavenged?