ACM Home Page
Please provide us with feedback. Feedback
Digital Library logoTake a look at the new version of this page: [ beta version ]. Tell us what you think.
Garbage collection in the next C++ standard
Full text PdfPdf (427 KB)
Source
International Symposium on Memory Management archive
Proceedings of the 2009 international symposium on Memory management table of contents
Dublin, Ireland
SESSION: Paper session 2 table of contents
Pages: 30-38  
Year of Publication: 2009
ISBN:978-1-60558-347-1
Authors
Hans-J. Boehm  HP Laboratories, Palo Alto, CA, USA
Mike Spertus  Symantec, Chicago, IL, USA
Sponsors
SIGPLAN: ACM Special Interest Group on Programming Languages
ACM: Association for Computing Machinery
Publisher
ACM  New York, NY, USA
Bibliometrics
Downloads (6 Weeks): 20,   Downloads (12 Months): 113,   Citation Count: 0
Additional Information:

abstract   references   index terms   collaborative colleagues  

Tools and Actions: Request Permissions Request Permissions    Review this Article  
DOI Bookmark: Use this link to bookmark this Article: http://doi.acm.org/10.1145/1542431.1542437
What is a DOI?

ABSTRACT

C++ 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 have been used with C for decades, and with C++ for almost as long, they have not been well-supported by language standards. This in turn has limited their use.

We have led an effort to change this by supporting optional "transparent" garbage collection in the next C++ standard. This is designed to either garbage collect or detect leaks in code using normal unadorned C++ pointers. We initially describe an ambitious effort that would have allowed programmers to explicitly request garbage collection. It faced a number of challenges, primarily in correct interaction with existing libraries relying on explicit destructor invocation. This effort was eventually postponed to the next round of standardization. This initial effort was then temporarily replaced by minimal support in the language that officially allows garbage collected implementations. Such minimal support is included in the current committee draft for the next C++ standard. It imposes an additional language restriction that makes it safe to garbage collect C++ programs. Stating this restriction proved subtle.

We also provide narrow interfaces that make it easy to both correct code violating this new restriction, and to supply hints to a conservative garbage collector to improve its performance. These provide interesting implementation challenges. We discuss partial solutions.


REFERENCES

Note: OCR errors may be found in this Reference List extracted from the full text article. ACM has opted to expose the complete List rather than only correct and linked references.

1
 
2
D. Blake. Programming languages: Everyone has a favorite one. Dr. Dobb's Journal, 18(3), April 2008.
 
3
H.-J. Boehm. A garbage collector for C and C++. http://www.hpl.hp.com/personal/Hans_Boehm/gc/.
4
5
 
6
H.-J. Boehm. Fast multiprocessor memory allocation and garbage collection. Technical Report HPL-2000-165, HP Laboratories, December 2000.
7
8
9
10
11
 
12
H.-J. Boehm and M. Spertus. N2261: Optimization-robust finalization. http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2261.html.
 
13
H.-J. Boehm and M. Spertus. N2310: Transparent programmer-directed garbage collection for c++. http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2310.pdf.
 
14
H.-J. Boehm, M. Spertus, and C. Nelson. N2670: Minimal support for garbage collection and reachability-based leak detection (revised). http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2670.htm.
 
15
 
16
W. Bright. Digital mars. http://www.digitalmars.com/.
17
 
18
G. Colvin, B. Dawes, P. Dimov, and D. Adler. Boost smart pointer library. http://www.boost.org/libs/smart\_ptr/.
 
19
 
20
J. R. Ellis and D. L. Detlefs. Safe, efficient garbage collection for C++. Technical Report CSL-93-4, Xerox Palo Alto Research Center, September 1993.
 
21
R. Hastings and B. Joyce. Purify: Fast detection of memory leaks and access errors. In Winter Usenix Conference, pages 125--136, 1992.
 
22
H. Hinnant. N2771: Lwg issues. http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2771.html.
23
 
24
ISO/IEC JTC1/SC22/WG21. ISO/IEC 14882, Programming Language - C++ (Oct 2008 committee draft). http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2800.pdf.
 
25
M. Kapur. Using the c/c++garbage collection library, libgc. http://developers.sun.com/solaris/articles/libgc.html.
 
26
27
 
28
P. Rovner. On adding garbage collection and runtime types to a strongly-typed, statically-checked, concurrent language. Technical Report CSL-84-7, Xerox Palo Alto Research Center, July 1985.
29
 
30
D. Vandevoorde. N2073: Modules in c++ (revision 4). http://www.open--std.org/jtc1/sc22/wg21/docs/papers/2006/n2073.pdf.

Collaborative Colleagues:
Hans-J. Boehm: colleagues
Mike Spertus: colleagues