Comment by kazinator
3 hours ago
Generally speaking, whenever you trace into the old generation, you stop and back out. Given a young generation object with pointer fields, you don't know which of them are also young and which are old, unless you examine them, which is tracing. So the tracing pokes into the surface of the sediment generation, so to speak.
Then if the language allows mutation of objects, special consideration has to be given to old objects that were mutated to point to new ones. You can treat those as additional roots; the graph of young objects reachable from a mutated old object is reachable. (Considered so on the assumption of the old object being reachable, which we can only disprove by doing a full scan.)
No comments yet
Contribute on Hacker News ↗