<div dir="ltr"><div>Hi,</div><div>I hope it's possible for you to answer before the deadline for the graded quiz :).</div><div><br></div><div> From the description of mark&sweep : <a href="https://www.educative.io/courses/a-quick-primer-on-garbage-collection-algorithms/jy6v">https://www.educative.io/courses/a-quick-primer-on-garbage-collection-algorithms/jy6v</a></div><div>"the collector walks over all the roots (global variables, local variables, stack frames, virtual and hardware registers etc.)"</div><div><br></div><div>Questions:</div><div>1. I assume that roots are references (because how could there be an object in any hw register). Is my understanding correct? <br></div><div><br></div><div>2. If roots are references, how does GC know if it is a valid reference or not ? Is it implementation specific of the language or there is some general technique ?</div><div><br></div><div>Trebuňa<br></div></div>