skip to main content
10.1145/2687233.2687244acmotherconferencesArticle/Chapter ViewAbstractPublication Pagescee-secrConference Proceedingsconference-collections
research-article

Precise garbage collection for C++ with a non-cooperative compiler

Published:23 October 2014Publication History

ABSTRACT

We describe a garbage collector for C++ implemented as a user-level library, which does not require a cooperative compiler but makes use of a custom garbage-collection-friendly heap implementation. We claim our garbage collector to be precise, i.e. capable to precisely identify all pointers to all managed objects, tolerant to the conventional C++ manual memory management, and safe in the sense that it does not affect the semantics of the program as long as a simple conventions, encouraged by library interface, are followed. We also discuss a performance penalties imposed by the usage of our library on an end-user program.

References

  1. Daniil Berezun. Root Set Identification and Maintenance for Garbage Collection (in Russian) // JetBrains Programming Languages and Tools Laboratory Reports, Issue 1, 2013.Google ScholarGoogle Scholar
  2. Richard Jones, Rafael Lins. Garbage Collection: Algorithms for Automatic Dynamic Memory Management. John Wiley & Sons, Inc., 1996. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. Richard Jones, Antony Hosking, Eliot Moss. The Garbage Collection Handbook: The Art of Automatic Memory Management. Chapman & Hall/CRC, 2011. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. Alexander Samofalov. Mark-and-Sweep Garbage Collector Implementation for LLVM (in Russian). Term paper, Department of Software Engineering, Faculty of Mathematics and Mechanics, St. Petersburg State University, 2014.Google ScholarGoogle Scholar
  5. Liana Bakradze. Garbage Collection Invocation Discipline (in Russian). Term paper, Department of Software Engineering, Faculty of Mathematics and Mechanics, St. Petersburg State University, 2014.Google ScholarGoogle Scholar
  6. Erich Gamma, Richard Helm, Ralph Johnson, John Vlissides. Design Patterns. Elements of Reusable Object-Oriented Software. Pearson Education, 1994. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. Joel F. Bartlett. A Generational, Compacting Garbage Collector for C++ // ECOOP/OOPSLA Workshop on Garbage Collection in Object-Oriented Systems, 1990.Google ScholarGoogle Scholar
  8. Hans-J. Boehm, Mike Spertus. Garbage Collection in the Next C++ Standard // Proceedings of the International Symposium on Memory Management, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. Igor Semenov. Smart Pointers in C++ (in Russian) // RSDN Magazine, No. 1, 2008.Google ScholarGoogle Scholar
  10. Herbert Schildt. The Art of C++. The McGraw-Hill Companies, Inc., 2004. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. Bjarne Stroustrup. Programming: Principles and Practice Using C++. Addison-Wesley, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. Andrei Alexandrescu. Modern C++ Design: Generic Programming and Design Patterns Applied. Addison-Wesley, 2001. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. John R. Ellis, David L. Detlefs. Safe, Efficient Garbage Collection for C++ // Proceedings of the 6th Conference on USENIX Sixth C++ Technical Conference, Vol. 6, 1994. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. William E. Kempf. A Garbage Collection Framework for C++. http://www.codeproject.com/Articles/912/A-garbage-collection-framework-for-C.Google ScholarGoogle Scholar
  15. Herb Sutter. A Design Rationale for C++/CLI // http://www.gotw.ca/publications/C++CLIRationale.pdf, 2006.Google ScholarGoogle Scholar
  16. Information Technology --- Programming Languages --- C++. ISO/IEC 14882: 2011.Google ScholarGoogle Scholar

Index Terms

  1. Precise garbage collection for C++ with a non-cooperative compiler

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
  • Published in

    cover image ACM Other conferences
    CEE-SECR '14: Proceedings of the 10th Central and Eastern European Software Engineering Conference in Russia
    October 2014
    176 pages
    ISBN:9781450328890
    DOI:10.1145/2687233

    Copyright © 2014 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 the author(s) 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: 23 October 2014

    Permissions

    Request permissions about this article.

    Request Permissions

    Check for updates

    Qualifiers

    • research-article
  • Article Metrics

    • Downloads (Last 12 months)2
    • Downloads (Last 6 weeks)1

    Other Metrics

PDF Format

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader