Comparing Two Garbage Collectors for C++ (1992)
| Citations: | 1 - 0 self |
BibTeX
@TECHREPORT{Edelson92comparingtwo,
author = {Daniel R. Edelson},
title = {Comparing Two Garbage Collectors for C++},
institution = {},
year = {1992}
}
OpenURL
Abstract
Our research is concerned with compiler-independent, tag-free garbage collection for the C++ programming language. This paper presents a mark-and-sweep collector, and explains how it ameliorates shortcomings of a previous copy collector. The new collector, like the old, uses C++'s facilities for creating abstract data types to define a tracked reference type, called roots, at the level of the application program. A programmer wishing to utilize the garbage collection service uses these roots in place of normal, raw pointers. We present a detailed study of the cost of using roots, as compared to both normal pointers and reference counted pointers, in terms of instruction counts. We examine the efficiency of a small C++ application using roots, reference counting, manual reclamation, and conservative collection. Coding the application to use garbage collection, and analyzing the resulting efficiency, helped us identify a number of memory leaks and inefficiencies in the original, m...







