Abstract
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.
Talk to us
Join us for a 30 min session where you can share your feedback and ask us any queries you have
Disclaimer: All third-party content on this website/platform is and will remain the property of their respective owners and is provided on "as is" basis without any warranties, express or implied. Use of third-party content does not indicate any affiliation, sponsorship with or endorsement by them. Any references to third-party content is to identify the corresponding services and shall be considered fair use under The CopyrightLaw.