Mark-and-Sweep Garbage Collector
Interactive 3D mark-and-sweep garbage collector: allocate heap objects, drop references, and watch a real reachability-marking wavefront followed by a sweep phase reclaim unreachable memory, with optional generational (young/old) collection.
Every managed-memory language — Java, JavaScript, Python, Go — reclaims memory automatically by treating the heap as a directed reference graph and asking one question: can this object still be reached from a root? This simulator renders that heap as a live 3D graph. Allocate objects, wire and drop references between them, and watch a real breadth-first mark phase spread outward from the gold root nodes, followed by a sweep phase that ejects every node the wavefront never touched — the exact two-phase algorithm (and its generational young/old refinement) that runs, invisibly, under almost every program you use.
Watch a real mark-and-sweep garbage collector at work on a live 3D heap: allocate objects, wire and drop references, then trigger a BFS reachability scan from the roots followed by a sweep that reclaims everything the wavefront never touched, with an optional generational young/old mode.
3D · Three.js / WebGL renderer · 60 FPS target · runs fully client-side, no install