Each cell has a bit reserved for marking which is clear initially. During garbage collection all active cells are traced from the root and marked. Then all cells are examined. Unmarked cells are freed.
MARK-SWEEP GARBAGE COLLECTION
Meaning of MARK-SWEEP GARBAGE COLLECTION in English
FOLDOC computer English dictionary. Английский словарь по компьютерам FOLDOC. 2012