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.
- Daniil Berezun. Root Set Identification and Maintenance for Garbage Collection (in Russian) // JetBrains Programming Languages and Tools Laboratory Reports, Issue 1, 2013.Google Scholar
- Richard Jones, Rafael Lins. Garbage Collection: Algorithms for Automatic Dynamic Memory Management. John Wiley & Sons, Inc., 1996. Google ScholarDigital Library
- Richard Jones, Antony Hosking, Eliot Moss. The Garbage Collection Handbook: The Art of Automatic Memory Management. Chapman & Hall/CRC, 2011. Google ScholarDigital Library
- 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 Scholar
- 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 Scholar
- Erich Gamma, Richard Helm, Ralph Johnson, John Vlissides. Design Patterns. Elements of Reusable Object-Oriented Software. Pearson Education, 1994. Google ScholarDigital Library
- Joel F. Bartlett. A Generational, Compacting Garbage Collector for C++ // ECOOP/OOPSLA Workshop on Garbage Collection in Object-Oriented Systems, 1990.Google Scholar
- Hans-J. Boehm, Mike Spertus. Garbage Collection in the Next C++ Standard // Proceedings of the International Symposium on Memory Management, 2009. Google ScholarDigital Library
- Igor Semenov. Smart Pointers in C++ (in Russian) // RSDN Magazine, No. 1, 2008.Google Scholar
- Herbert Schildt. The Art of C++. The McGraw-Hill Companies, Inc., 2004. Google ScholarDigital Library
- Bjarne Stroustrup. Programming: Principles and Practice Using C++. Addison-Wesley, 2009. Google ScholarDigital Library
- Andrei Alexandrescu. Modern C++ Design: Generic Programming and Design Patterns Applied. Addison-Wesley, 2001. Google ScholarDigital Library
- 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 ScholarDigital Library
- William E. Kempf. A Garbage Collection Framework for C++. http://www.codeproject.com/Articles/912/A-garbage-collection-framework-for-C.Google Scholar
- Herb Sutter. A Design Rationale for C++/CLI // http://www.gotw.ca/publications/C++CLIRationale.pdf, 2006.Google Scholar
- Information Technology --- Programming Languages --- C++. ISO/IEC 14882: 2011.Google Scholar
Index Terms
- Precise garbage collection for C++ with a non-cooperative compiler
Recommendations
Precise garbage collection for C
ISMM '09: Proceedings of the 2009 international symposium on Memory managementMagpie is a source-to-source transformation for C programs that enables precise garbage collection, where precise means that integers are not confused with pointers, and the liveness of a pointer is apparent at the source level. Precise GC is primarily ...
Garbage collection in the next C++ standard
ISMM '09: Proceedings of the 2009 international symposium on Memory managementC++ has traditionally relied on manual memory management. Sometimes this has been augmented by limited reference counting, implemented in libraries, and requiring use of separate pointer types. In spite of the fact that conservative garbage collectors ...
A generational on-the-fly garbage collector for Java
PLDI '00: Proceedings of the ACM SIGPLAN 2000 conference on Programming language design and implementationAn on-the-fly garbage collector does not stop the program threads to perform the collection. Instead, the collector executes in a separate thread (or process) in parallel to the program. On-the-fly collectors are useful for multi-threaded applications ...
Comments