Changes between Version 1 and Version 2 of GCSweepFreeImplementation

Show
Ignore:
Timestamp:
05/10/10 22:58:08 (12 years ago)
Author:
bacek
Comment:

Minor fix

Legend:

Unmodified
Added
Removed
Modified
  • GCSweepFreeImplementation

    v1 v2  
    2424During the mark phase, we append every live GCable to the LIVE list, if it's in the MAYBE list.  (We'll have to manage the existing flags carefully to avoid adding and re-adding; perhaps some toggle will help.  "Last time, 0 meant live.  This time, 1 means live.") 
    2525 
    26 By the end of the mark phase, all live GCables should be in the LIVE list.  Everything in the MAYBE list should now be DEAD, so we can append it to that list.  We can walk the MAYBE list and perform any custom destruction then. 
     26By the end of the mark phase, all live GCables should be in the LIVE list.  Everything in the MAYBE list should now be DEAD, so we can append it to that list.  We can walk the DEAD list and perform any custom destruction then. 
    2727 
    2828The benefit to this system is that the O(n) operation of the sweep (which tends to hew to the full extent of n) of sweeping becomes much more efficient.  The cost of allocating an object is slightly higher due to the need to manipulate pointers in the linked lists, but the cost of freeing dead objects is much cheaper.