Browsing by Author "Ginter, Andrew"
Now showing 1 - 3 of 3
Results Per Page
Sort Options
- ItemOpen AccessCOOPERATIVE GARBAGE COLLECTORS USING SMART POINTERS IN THE C++ PROGRAMMING LANGUAGE(1991-12-01) Ginter, AndrewThis 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.
- ItemOpen AccessDESIGN ALTERNATIVES FOR A COOPERATIVE GARBAGE COLLECTOR FOR THE C++ PROGRAMMING LANGUAGE(1991-01-01) Ginter, AndrewCurrently, conservative garbage collectors for C++ are the collectors which enjoy the most use. While prototype cooperative collectors have been written for C++, the language does not support either a type-safe or a reliable cooperative collector. This report examines design alternatives for adding support to the C++ programming language for cooperative garbage collection and discusses in detail alternatives which provide language support for user defined cooperative collectors. This report concludes that no C++ collector supporting multiple storage classes can be completely cooperative. Furthermore, language-recognized parameterized smart pointer types show promise both for supporting user defined collectors and for supporting persistent object caches, distributed object stores and other kinds of storage managers. Further research is needed however, in the areas of type inquiry and the coordination of multiple storage managers, before any parameterized smart pointer proposal can be completed. This discussion is based on experiments with a compacting, cooperative collector in existing implementations of C++. The changes to the language discussed in this report have not yet been implemented.
- ItemOpen AccessA PROPOSAL FOR A COOPERATIVE, GARBAGE COLLECTED "C" PROGRAMMING LANGUAGE(1990-04-01) Ginter, AndrewThis report identifies issues which arise when extending the C language to cooperate with a garbage collector managing a garbage collected heap. Adding a garbage collected heap to C is intended to increase programmer productivity by reducing the complexity of applications which use dynamically allocated memory. A mechanism is known for garbage collection in C applications which do not cooperate with the collector, but this mechanism is relatively expensive. This report proposes modifications to the C language which will allow it to cooperate with a garbage collector. The proposal modifies the syntax and semantics of C very little, and the extension degrades the performance of only those expressions which manipulate references to the garbage collected heap. The proposal was partially implemented in a compiler for a C-like language whose target machine was a FORTH-like virtual machine.