Pergunta de entrevista da empresa Amazon

Explain how Mark&Sweep is implemented.

Resposta da entrevista

Sigiloso

16 de jul. de 2010

each object has an extra bit that is for marking. from main app each objects directly accessible are called "roots". from each root, mark process travers down the referencing and mark all the objects it can hit. when sweep process runs it checks all the objects and frees unmarked objects.