COOPERATIVE GARBAGE COLLECTORS USING SMART POINTERS IN THE C++ PROGRAMMING LANGUAGE

Date
1991-12-01
Journal Title
Journal ISSN
Volume Title
Publisher
Abstract
This research proposes to modify the C++ programming language to make it easier to define reliable, type-safe, user-defined, cooperative garbage collectors using smart-pointer classes. The major changes: -allow smart pointers to act as "this" pointers in member functions, -require the compiler to emit warnings when dangerous uses of smart pointers are detected, -restrict the use of some compiler temporaries, and -modify the rules governing the conversion of one smart-pointer class to another. Most of the proposed changes have been implemented in a C++ compiler. The modified compiler was used to implement a list-processing benchmark that uses a simple garbage collector and smart-pointer classes. The benchmark shows that the run-time cost of using smart pointers is non-trivial and suggestions are made that should improve this performance substantially. An algorithm is also described that coordinates the activities of many collectors in an application, in order to reclaim cycles of objects that span garbage-collected heaps. The main conclusion of this research is that it is practical to modify the C++ language to support reliable, type-safe user-defined, cooperative garbage collectors that use smart pointer classes.
Description
Keywords
Computer Science
Citation