3 ms·
there was an article a few month ago here describing how refcounts and liveness reachability were the two dual basic GC and most simple GC are a combination of
by afiori 8y ago
there was an article a few month ago here describing how refcounts and liveness reachability were the two dual basic GC and most simple GC are a combination of the two techniques.
- pron 8y agoWas it this one? https://www.cs.virginia.edu/~cs415/reading/bacon-garbage.pdf https://www.cs.virginia.edu/~cs415/reading/bacon-garbage.pdf Tracing and reference counting are two GC approaches that the paper shows are dual in some interesting ways and can have similar characteristic -- when both are sophisticated enough.
- afiori 8y agoyes, thank you.
- erichocean 8y agoAll programming languages are "duals" of each other in the Turing complete sense, though that doesn't tell you much beyond: they're programming languages. So here's how reference counting and garbage collection are duals: they both manage the memory lifetimes for objects not on the stack. If that blows your mind, you also might enjoy the above referenced paper and the meme that reference counting is "GC done badly".
- afiori 8y agoI was referring specifically to the paper https://www.cs.virginia.edu/~cs415/reading/bacon-garbage.pdf https://www.cs.virginia.edu/~cs415/reading/bacon-garbage.pdf (found by pron in another comment). Where duality is in term of seeing reference counting as a form of negative-tracing. the paper also analyzes various techniques and claim that they mostly just mixes the two approaches. also if I can be facetious: > So here's how reference counting and garbage collection are duals: they both manage the memory lifetimes for objects not on the stack. that would be an equivalence, not a duality.