stop-and-copy garbage collection
basic idea
- divide memory into two halves
working memory: cons cells are allocated here
free memory: unused, except by garbage collector
- when working memory is full
stop the computation
copy the live data structuresby tracing from the roots of the data structure (eg registers)from the working memory to the free memory
- then
working becomes free
free becomes working