Let's address another GC misconception: that you can divide GC algorithms into "perfectly precise" ones like tracing and "imprecise" ones like reference counting without cycle collection.
-
-
Precise tracing GCs approximate this problem by identifying memory that is no longer *reachable* from a set of root objects. This is a narrower set than the set of data the program will dynamically use again. The difference is why you can still have leaks in e.g. JS.
Show this thread -
Reference counting approximates that set with the set of objects whose reference count is zero. Conservative tracing GC approximates it with the set of objects whose pointer address appears nowhere in memory.
Show this thread -
All GCs use some sort of conservative heuristic. We can talk about which heuristics are more precise than others, but it's incorrect to refer to tracing as establishing some sort of "ground truth". Instead, all algorithms approximate the problem.
Show this thread
End of conversation
New conversation -
-
-
I see this as some sketchy pro-GC propaganda, redefining the exact, tractable problem (unreachable) to be something harder and intractable (not reached) so that inexactness sounds like just a matter of degree rather than a binary property.
-
I don’t mean for it to be “pro-GC” or “anti-GC”. The point is that the precise tractable problem of reachability is not actually the relevant criterion.
- 1 more reply
New conversation -
-
Show additional replies, including those that may contain offensive content
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.