Check out the new USENIX Web site.

Safe, Efficient Garbage Collection for C++

John R. Ellis            David L. Detlefs         
Xerox PARC               DEC Systems Research Center
3333 Coyote Hill Road    130 Lytton Ave.
Palo Alto, CA 94304      Palo Alto, CA 94302


We propose adding safe, efficient garbage collection to C++, eliminating the possibility of storage-management bugs and making the design of complex, object-oriented systems much easier. This can be accomplished with almost no change to the language itself and only small changes to existing implementations, while retaining compatibility with existing class libraries. Our proposal is the first to take a holistic, system-level approach, integrating four technologies. The language interface specifies how programmers access garbage collection through the language. An optional safe subset of the language automatically enforces the safe-use rules of garbage collection and precludes storage bugs. A variety of collection algorithms are compatible with the language interface, but some are easier to implement and more compatible with existing C++ and C implementations. Finally, code-generator safety ensures that compilers generate correct code for use with collectors.

Download the full text of this paper in ASCII (131,785 bytes) and POSTSCRIPT (274,847 bytes) form.

To Become a USENIX Member, please see our Membership Information.