I’m trying to better understand the interaction between GC roots and the remembered set with a similar question posed here.
My understanding is that if you traverse starting from GC roots, you will eventually scan all live objects in old gen and new gen no matter what. So there must be something I’m missing if we also want a remembered set. How does having this remembered set help? Do we only consider a subset of the GC roots then when we have a remembered set?