[NSWI004] [nswi004] roots

František Trebuňa ferotre at gmail.com
Thu Oct 29 09:52:31 CET 2020


Hi,
I hope it's possible for you to answer before the deadline for the graded
quiz :).

>From the description of mark&sweep :
https://www.educative.io/courses/a-quick-primer-on-garbage-collection-algorithms/jy6v
"the collector walks over all the roots (global variables, local variables,
stack frames, virtual and hardware registers etc.)"

Questions:
1. I assume that roots are references (because how could there be an object
in any hw register). Is my understanding correct?

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 ?

Trebuňa
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://d3s.mff.cuni.cz/pipermail/nswi004/attachments/20201029/9c9c4094/attachment.htm>


More information about the NSWI004 mailing list