Changes between Version 1 and Version 2 of Commentary/Rts/Storage/GC/Copying
- Timestamp:
- 12/04/09 05:22:14 (3 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Commentary/Rts/Storage/GC/Copying
v1 v2 8 8 9 9 * 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]. 12 11 13 12 * 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. … … 21 20 Scavenging is implemented in the file [[GhcFile(rts/sm/Scav.c)]].[[br]] 22 21 22 The 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).
