Skip to main content

Generational garbage collection for lazy graph reduction

  • Functional Languages
  • Conference paper
  • First Online:
Memory Management (IWMM 1992)

Part of the book series: Lecture Notes in Computer Science ((LNCS,volume 637))

Included in the following conference series:

Abstract

Although the LISP community have been exploiting the fruits of generational garbage collection for some time, little attempt has been made to apply these ideas in lazy functional language implementations. This paper attempts to plug that gap.

The action of overwriting an unevaluated thunk with its final value, known as updating, is central to lazy reduction systems. Unfortunately, updating creates pointers from older to younger generations. A simple two-generation scheme which allows heap occupancy to approach 100% is presented. This collector is a hybrid semispace and mark-scan collector. We show that keeping track of old-to-new pointers imposes virtually zero time and space overhead on the mutator. Consequently a net performance gain can be had by using generational collection.

This paper describes how a generational collector was incorporated into a standard G-machine interpreter. Detailed performance measurements presented indicate that a significant improvement in overall performance is achieved, compared to both semispace and compacting mark-scan collectors. Some interesting variants of the basic scheme are discussed. Finally, a possible compiled-code implementation is presented.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

Bibliography

  1. Andrew W. Appel. Compiling with Continuations. Cambridge University Press, 1992.

    Google Scholar 

  2. L. Augustsson. A compiler for lazy ML. In Proceedings of the 1984 ACM Symposium on Lisp and Functional Programming, pages 218–227, Austin, Texas, August 1984.

    Google Scholar 

  3. C. J. Cheney. A nonrecursive list compacting algorithm. Communications of the ACM, 13:677–678, November 1970.

    Article  Google Scholar 

  4. T. Johnsson. Compiling Lazy Functional Languages. PhD thesis, Chalmers Tekniska Högskola, Göteborg, Sweden, 1987.

    Google Scholar 

  5. H. B. M. Jonkers. A fast garbage compaction algorithm. Information Processing Letters, 9:26–30, July 1979.

    Article  Google Scholar 

  6. S.L. Peyton Jones. The Implementation of Functional Programming Languages. Prentice-Hall International Series in Computer Science. Prentice-Hall International (UK) Ltd, London, 1987.

    Google Scholar 

  7. S.L. Peyton Jones. The spineless tagless g-machine: second attempt. Publication forthcoming, 1991.

    Google Scholar 

  8. Patrick M. Sansom. Dual-mode garbage collection. In Proceedings of the 1991 Glasgow Functional Programming Workshop, 1991.

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Yves Bekkers Jacques Cohen

Rights and permissions

Reprints and permissions

Copyright information

© 1992 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Seward, J. (1992). Generational garbage collection for lazy graph reduction. In: Bekkers, Y., Cohen, J. (eds) Memory Management. IWMM 1992. Lecture Notes in Computer Science, vol 637. Springer, Berlin, Heidelberg. https://doi.org/10.1007/BFb0017191

Download citation

  • DOI: https://doi.org/10.1007/BFb0017191

  • Published:

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-55940-5

  • Online ISBN: 978-3-540-47315-2

  • eBook Packages: Springer Book Archive

Publish with us

Policies and ethics