A time- and space-efficient garbage compaction algorithm
F. Lockwood Morris · Communications of the ACM · 1978
Given an area of storage containing scattered, marked nodes of differing sizes, one may wish to rearrange them into a compact mass at one end of the area while revising all pointers to marked nodes to show their new locations. An algorithm is described here which accomplishes this task in linear time relative to the size of the storage area, and in a space of the order of one bit for each pointer. The algorithm operates by reversibly encoding the situation (that a collection of locations point to a single location) by a linear list, emanating from the pointed-to location, passing through the pointing locations, and terminating with the pointed-to location's transplanted contents.
Cited by 66 works. doi:10.1145/359576.359583 Open-access PDF
Authors
References
- The Art of Computer Programming
- A LISP garbage-collector for virtual-memory computer systems
- Multiprocessing compactifying garbage collection
- A LISP Garbage Collector Algorithm Using Serial Secondary Storage
- A nonrecursive list compacting algorithm
- Fundamental algorithms
- Compact list representation
- The Programming Language LISP: Its Operation and Applications.
- A generalised compactifying garbage collector