mark-sweep garbage collection

mark-sweep garbage collection

Each cell has a bit reserved for marking which is clearinitially. During garbage collection all active cells aretraced from the root and marked. Then all cells are examined.Unmarked cells are freed.