


















































Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!



















































Reference Counting Mark-and-Sweep Short-Pause Methods
7
Garbage Collectors
Reference- Counters
Trace- Based
11
Root Object
A(1)
D(2) E(1)
B(2)
C(1)
13
Root Object
D(2) E(1)
B(1)
C(0)
14
Root Object
D(1) E(1)
B, D, and E are^ B(1) garbage, but their reference counts are all > 0. They never get collected.
1. Free = not holding an object; available for allocation. 2. Unreached = Holds an object, but has not yet been reached from the root set. 3. Unscanned = Reached from the root set, but its references not yet followed. 4. Scanned = Reached and references followed.
examine one of these objects; make its state be Scanned; add all referenced objects to Unscanned if they have not been there; end ;
19
Garbage Collectors Reference- Counters
Trace- Based Stop-the-World Short-Pause Mark-and- Sweep
Mark-and- Compact
Basic Baker’s