THE FOLD / RESPAWN / GARBAGE COLLECTION / GARBAGE COLLECTION
GARBAGE COLLECTION
sweep the dead, reclaim the memory
roots (gold) reach some objects, not all.
reachable — · garbage — · freed 0
heap live
LIT Genuine tracing garbage collection. MARK does a real graph traversal from the root set, flagging every reachable object; SWEEP frees the unmarked. For this heap the roots reach {0,2,3,4} and {1,5}; the island {6,7} points only at itself, so it's unreachable and collected. Reachable/garbage/freed counts are computed from the actual traversal (window.__gc).
FIG The glowing boxes are the picture; mark-and-sweep reachability is precisely how real runtimes decide what to free. RESPAWN's 'die & return' fits: the dead are reclaimed so the live can go on.
FIG The glowing boxes are the picture; mark-and-sweep reachability is precisely how real runtimes decide what to free. RESPAWN's 'die & return' fits: the dead are reclaimed so the live can go on.
◆ sealed .dlw.fold → folded to ROOT_0 · a sphere of GARBAGE COLLECTION · David Lee Wise (ROOT0), with AVAN