skip to main content
article

Accurate garbage collection in an uncooperative environment

Published:20 June 2002Publication History
Skip Abstract Section

Abstract

Previous attempts at garbage collection in uncooperative environments have generally used conservative or mostly-conservative approaches. We describe a technique for doing fully type-accurate garbage collection in an uncooperative environment, using a "shadow stack" to link structs of pointer-containing variables, together with the data or code needed to trace them. We have implemented this in the Mercury compiler, which generates C code, and present preliminary performance data on the overheads of this technique. We also show how this technique can be extended to handle multithreaded applications.

References

  1. Joel F. Bartlett. Mostly-Copying garbage collection picks up generations and C++. Technical Note TN--12, Digital, Western Research Laboratory, 1989.Google ScholarGoogle Scholar
  2. Hans Boehm. Simple garbage-collector-safety. In Proceedings of the ACM SIGPLAN '96 Conference on Programming Language Design and Implementation, 1996. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. Hans Boehm and David Chase. A proposal for garbage-collector-safe C compilation. Journal of C Language Translation, 4:126--141, December 1992.Google ScholarGoogle Scholar
  4. Hans Boehm and Mark Weiser. Garbage collection in an uncooperative environment. Software --- Practice and Experience, 18:807--820, 1988. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. William D. Clinger. Proper tail recursion and space efficiency. In Proceedings of the ACM SIGPLAN '98 Conference on Programming Language Design and Implementation, pages 174--185, 1998. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. Robert Dewar. Mail to the GCC mailing list ([email protected]). URL: http://gcc.gnu.org\zml\zgcc\z2001-07\zmsg01990.html, July 2001.Google ScholarGoogle Scholar
  7. Tyson Dowd, Zoltan Somogyi, Fergus Henderson, Thomas Conway, and David Jeffery. Run time type information in Mercury. In Proceedings of the 1999 International Conference on the Principles and Practice of Declarative Programming, pages 224--243, Paris, France, September 1999. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. Daniel R. Edelson and Ira Pohl. A copying collector for C++. In USENIX C++ Conference Proceedings, pages 85--102, 1991Google ScholarGoogle Scholar
  9. Daniel Ross Edelson. Dynamic storage reclamation in C++. Technical Report UCSC-CRL-90-19, UCSC, June 1990. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. David Chase (et al?). GC FAQ (garbage collection frequently asked questions). URL: http://www.iecc.com\zgclist\zGC-faq.html.Google ScholarGoogle Scholar
  11. Benjamin Goldberg. Tag-free garbage collection for strongly typed programming languages. In Proceedings of the ACM SIGPLAN '91 Conference on Programming Language Design and Implementation, pages 165--176, Toronto, Ontario, Canada, June 26--28, 1991. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. David R. Hanson and Mukund Raghavachari. A machine-independent debugger. In Software --- Practice and Experience, volume 26, pages 1277--1299, November 1996. Google ScholarGoogle Scholar
  13. Fergus Henderson and Zoltan Somogyi. Compiling Mercury to high-level C code. In Nigel Horspool, editor, Proceedings of the 2002 International Conference on Compiler Construction, Grenoble, France, April 2002. Springer-Verlag. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. Fergus Henderson, Zoltan Somogyi, and Thomas Conway. Compiling logic programs to C using GNU C as a portable assembler. In Proceedings of the ILPS '95 Postconference Workshop on Sequential Implementation Technologies for Logic Programming Languages, Portland, Oregon, December 1995.Google ScholarGoogle Scholar
  15. Simon L. Peyton Jones, Cordy Hall, Kevin Hammond, Will Partian, and Phil Wadler. The Glasgow Haskell compiler: a technical overview. In Proceedings of the UK Joint Framework for Information Technology (JFIT) Technical Conference, Keele, 1993.Google ScholarGoogle Scholar
  16. Simon Peyton Jones, Norman Ramsey, and Fermin Reig. C--: a portable assembly language that supports garbage collection. In International Conference on Principles and Practice of Declarative Programming, September 1999. Invited paper. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. Wolfgang Schreiner. RT++ --- higher order threads for C++, tutorial and reference manual. Technical Report 96-9, RISC-Linz, 1996. URL: http://www.risc.uni-linz.ac.at\zsoftware\zrt++\zindex\_131.html.Google ScholarGoogle Scholar
  18. Zoltan Somogyi, Fergus Henderson, and Thomas Conway. The execution algorithm of Mercury, an efficient purely declarative logic programming language. Journal of Logic Programming, 1997.Google ScholarGoogle Scholar
  19. David Stoutamire and Matt Kennel. Sather revisited: A high-performance free alternative to C++. Computers in Physics, 9:519--524, Sep/Oct 1995.Google ScholarGoogle ScholarCross RefCross Ref
  20. David Tarditi, Anurag Acharya, and Peter Lee. No assembly required: Compiling Standard ML to C. Technical Report CMU-CS-90-187, School of Computer Science, Carnegie Mellon University, Pittsburgh, PA 15213, November 1990.Google ScholarGoogle Scholar
  21. Paul R. Wilson. Uniprocessor garbage collection techniques. In Yves Bekkers and Jacques Cohen, editors, Proceedings of International Workshop on Memory Management, volume 637 of Lecture Notes in Computer Science, pages 16--18, St Malo, France, September 1992. Springer-Verlag. Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. G. May Yip. Incremental, generational mostly-copying garbage collection in uncooperative environments. Technical Report 91/8, Digital, Western Research Laboratory, June 1991. Masters Thesis -- MIT, Cambridge, MA, 1991.Google ScholarGoogle Scholar

Index Terms

  1. Accurate garbage collection in an uncooperative environment

    Recommendations

    Comments

    Login options

    Check if you have access through your login credentials or your institution to get full access on this article.

    Sign in

    Full Access

    • Published in

      cover image ACM SIGPLAN Notices
      ACM SIGPLAN Notices  Volume 38, Issue 2 supplement
      MSP 2002 and ISMM 2002
      February 2003
      291 pages
      ISSN:0362-1340
      EISSN:1558-1160
      DOI:10.1145/773039
      Issue’s Table of Contents
      • cover image ACM Conferences
        ISMM '02: Proceedings of the 3rd international symposium on Memory management
        June 2002
        192 pages
        ISBN:1581135394
        DOI:10.1145/512429

      Copyright © 2002 ACM

      Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

      Publisher

      Association for Computing Machinery

      New York, NY, United States

      Publication History

      • Published: 20 June 2002

      Check for updates

      Qualifiers

      • article

    PDF Format

    View or Download as a PDF file.

    PDF

    eReader

    View online with eReader.

    eReader