Comment by whartung

3 years ago

I’ve written two garbage collectors in my time, neither of which were in a programming language.

One was for an in memory cache of data relationships. Another was to clean up soft references with an RDF graph. Neither were, nor needed to be, particularly sophisticated.

The cache was a compacting collector, the RDF one was mostly a “connectedness” test, pruning those nodes fallen from the graph.

Recall that malloc has a simple garbage collector for its free space, and arguably the level of sophistication that ranks a modern malloc implementation is how it manages its free space.

In the end detritus must be identified and resources reclaimed. So you see how GC like systems can occur in divergent areas of work.