Pregunta de entrevista de Amazon

Explain how Mark&Sweep is implemented.

Respuesta de la entrevista

Anónimo

16 jul 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.