Results 1 -
6 of
6
Space Efficient Conservative Garbage Collection
, 1993
"... We call a garbage collector conservative if it has only partial information about the location of pointers, and is thus forced to treat arbitrary bit patterns as though they might be pointers, in at least some cases. We show that some very inexpensive, but previously unused techniques can have drama ..."
Abstract
-
Cited by 103 (1 self)
- Add to MetaCart
We call a garbage collector conservative if it has only partial information about the location of pointers, and is thus forced to treat arbitrary bit patterns as though they might be pointers, in at least some cases. We show that some very inexpensive, but previously unused techniques can have dramatic impact on the effectiveness of conservative garbage collectors in reclaiming memory. Our most significant observation is that static data that appears to point to the heap should not result in misidentified references to the heap. The garbage collector has enough information to allocate around such references. We also observe that programming style has a significant impact on the amount of spuriously retained storage, typically even if the collector is not terribly conservative. Some fairly common C and C programming styles significantly decrease the effectiveness of any garbage collector. These observations suffice to explain some of the different assessments of conservative collection that have appeared in the literature.
A Copying Collector for C++
- Proc. of ACM Conference on Principle of Programming Languages
, 1991
"... Garbage collection is an extremely useful programming language feature that is currently absent from C++. The benefits from garbage collection include convenience and safety because the programmer is not responsible for freeing dynamically allocated storage. Many reclamation schemes improve efficien ..."
Abstract
-
Cited by 16 (1 self)
- Add to MetaCart
Garbage collection is an extremely useful programming language feature that is currently absent from C++. The benefits from garbage collection include convenience and safety because the programmer is not responsible for freeing dynamically allocated storage. Many reclamation schemes improve efficiency by compacting objects in memory improving locality and reducing paging. Some reclamation techniques are more efficient than manual reclamation for important classes of data structures. This paper presents a copying collector for C++ that supports polymorphism and does not require indirection through an "object table." This memory reclamation scheme is one of few that is philosophically consistent with the design goals of the C++ programming language: one must not be penalized for features that are not used. This report includes performance measurements from a prototype implementation. Introduction Garbage collection (GC) is a programming environment feature that removes the programmer 's...
Comparing Two Garbage Collectors for C++
, 1992
"... 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 cre ..."
Abstract
-
Cited by 1 (0 self)
- Add to MetaCart
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...
Type-Specific Storage Management
"... this memory allocator to be the only one in the program; it can satisfy the dynamic memory needs of the standard libraries by treating their allocation calls as requests for foreign objects. Foreign objects are not examined by the collector; they should only reference collected objects through smart ..."
Abstract
- Add to MetaCart
this memory allocator to be the only one in the program; it can satisfy the dynamic memory needs of the standard libraries by treating their allocation calls as requests for foreign objects. Foreign objects are not examined by the collector; they should only reference collected objects through smart pointers, not through raw pointers. The C++ feature that makes this process convenient is overloadable dynamic storage allocation operators: new and delete. These operators permit every class to supply functions 67 #include "gc.h" #pragma GCON CL class CL -- CL * ptr1; OTHER * ptr2; static void finalize(CL *); /* optional */ ... ; Figure 5.3: A class with internal pointers to handle memory allocation and deletion. In this case, operator new for a managed class passes in the type tag to the memory allocator. The default, global operator new passes in the type tag for foreign objects. A call to malloc(), which circumvents new, also allocates a foreign object. There are two main changes for a program that uses the precompiler for GC. Firstly, pragmas are used to indicate three things: 1. which application classes are collected, 2. which collector applies to which classes, and, 3. that the standard library classes are not collected. Secondly, global and foreign pointers are defined to be smart pointers rather than raw pointers. In conjunction with the copying collector, it may additionally be desirable to define certain stack pointers to be smart pointers; this can reduce the number of pointers that are found conservatively, thereby allowing more objects to be copied and compacted. Figure 5.3 shows some sample input to the precompiler; the transformations for locating internal pointers are shown in Fig. 5.4. These transformations are performed either by the precompiler or by t...
Type-Specific Storage Management (Shorter Version)
"... This report is a shorter version of UCSC--CRL--93--26. Extensive source code in appendices is omitted from this version. Keywords: Garbage collection, memory management, object-oriented programming, C++, memory allocation, reference counting i ..."
Abstract
- Add to MetaCart
This report is a shorter version of UCSC--CRL--93--26. Extensive source code in appendices is omitted from this version. Keywords: Garbage collection, memory management, object-oriented programming, C++, memory allocation, reference counting i

