z-logo
open-access-imgOpen Access
A generalised compactifying garbage collector
Author(s) -
Ben Wegbreit
Publication year - 1972
Publication title -
the computer journal
Language(s) - English
Resource type - Journals
SCImago Journal Rank - 0.319
H-Index - 64
eISSN - 1460-2067
pISSN - 0010-4620
DOI - 10.1093/comjnl/15.3.204
Subject(s) - pointer (user interface) , garbage collection , garbage , computer science , point (geometry) , database , algorithm , programming language , mathematics , artificial intelligence , geometry
Languages providing dynamic storage allocation usually provide for the automatic reclamation of unused storage by garbage collection (e.g., see McCarthy, 1962). In its simplest form, a garbage collector reclaims unused storage while leaving objects in use in situ, i.e., in the same memory locations. Hence, the storage in use eventually becomes scattered throughout memory. Under common conditions, this has deleterious consequences. If blocks of storage may be required in various sizes, the fragmentation of storage may produce a situation where there is no single free block large enough to satisfy some request although the total amount of free storage is great enough. A solution to this problem is compactifying garbage collection. That is, garbage collection in which the storage in use is moved to a contiguous region of memory and all pointers are adjusted to reflect this movement. The resulting list structure has the same topology as the old, so that re-entrancy and sharing of common substructure are preserved. There are several algorithms for doing this for particular list structures. Algorithms by Minsky (1963) and Fenichel and Yochelson (1969) work for LISP, i.e., list structure represented by linked blocks of two pointers each. Algorithms by Hansen (1969) and Cheney (1970) handle one-way list structure represented as a mixture of linked two-pointer blocks and sequential blocks of list elements. Each of these algorithms is tailored to a particular class of list structure and does not generalise to the case of arbitrary nodes. This paper presents a compactifying garbage collection technique that works on arbitrary nodes, even when pointers point into the middle of nodes. The next section outlines the need for such a technique.

The content you want is available to Zendy users.

Already have an account? Click here to sign in.
Having issues? You can contact us here
Accelerating Research

Address

John Eccles House
Robert Robinson Avenue,
Oxford Science Park, Oxford
OX4 4GP, United Kingdom