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


Ignore:
Timestamp:
Dec 4, 2009 1:22:14 PM (4 years ago)
Author:
simonmar
Comment:

--

Legend:

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

    v1 v2  
    88 
    99 * The object is ''evacutated'' (copied) to its destination generation.   The destination is given by `bd->dest` pointer in the `bdescr` of the 
    10    block in which it lives; typically an object is promoted to the next highest generation, but the basic policy is affected by  [wiki:Commentary/Rts/Storage/GC/Aging aging] and [wiki:Commentary/Rts/Storage/GC/EagerPromotion eager promotion].[[br]] 
    11    [[br]] 
     10   block in which it lives; typically an object is promoted to the next highest generation, but the basic policy is affected by  [wiki:Commentary/Rts/Storage/GC/Aging aging] and [wiki:Commentary/Rts/Storage/GC/EagerPromotion eager promotion]. 
    1211 
    1312 * The header word of the original object is replaced by a ''forwarding pointer''.  The forwarding pointer is just the pointer to the new copy, with the least significant bit set to 1 so that forwarding pointers can be distinguished from info table pointers. 
     
    2120Scavenging is implemented in the file [[GhcFile(rts/sm/Scav.c)]].[[br]] 
    2221 
     22The principle APIs are 
     23 
     24 `void evacuate (StgClosure **p)`:: 
     25   which evacuates the object pointed to by the pointer at `p`, and updates `p` to point to the new location. 
     26 
     27 `void scavenge_block (bdescr *bd)`:: 
     28   which scavenges all the objects in the block `bd` (objects betwee `bd->u.scan` and `bd->free` are assumed to 
     29   be unscavenged so far).