| D. Detlefs. Garbage collection and run-time typing as a C++ library. In Proceedings of the |
....C [69] and C [47] In such environments a possible solution consists of either a pre processor [44] or the compiler [22, 51, 103] to statically generate type information for each data type. Another alternative is to take advantage of some specific language features (e. g, smart pointers in C ) [36, 45] to generate the pointers locations. Another solution, called conservative GC [11, 21] relies on a conservative pointer finding approach, i.e. the collector treats anything that might be a pointer as a pointer. Thus, any properly aligned bit pattern that could be the address of an object is ....
David Detlefs. Garbage collection and run-time typing as a C++ library. In C++ Conference, pages 37--56, Portland OR (USA), August 1992. Usenix.
....code and define appropriate smart pointer classes to be used (instead of raw pointers) for the root set. The second task of the precompiler is to parse the type definitions and emit a member function for each garbage collected type to identify the internal pointers within that type. Detlefs [Det92] describes a modified scheme that is also based on smart pointers. This scheme extends the smart pointer definition further and constrains the programmer to use this interface for all garbage collected objects. The extended smart pointer definition provides additional actions to be performed when ....
David L. Detlefs. Garbage Collection and Run-Time Typing as a C++ Library. In USENIX C++ Conference [USE92].
....the entire run; it represents the nodes in a hypercube and their interconnections. 43 A very large number of other objects are created, but they are small and very short lived; they represent messages 40 This program (and the hypercube simulator described below) were also used by Detlefs in [Det92] for evaluation of a garbage collector. Based on several kinds of profiles, we now think that Detlefs choice of test programs may have led to an overestimation of the costs of his garbage collector for C . Neither of these programs is very friendly to a simple GC, especially one without ....
David L. Detlefs. Garbage collection and runtime typing as a C++ library. In USENIX C++ Conference, Portland, Oregon, August 1992. USENIX Association.
....for garbage collection (e.g. AF94, Ede92b] However, these libraries typically require programmers to provide methods that reveal pointer locations to the collector. Our system was designed to avoid burdening the programmer with such tedious and error prone coding. Detlefs library interface [Det92] is a little cleaner, but incurs extra overheads and restrictions because conceptually compile time operations must be performed within the language at run time. Our system avoids this problem by performing 14 Conceptually, this is a code linkage step data objects contain pointers to code, ....
David L. Detlefs. Garbage Collection and Run-Time Typing as a C++ Library. In USENIX C++ Conference
....collecting statically typed languages. It is even possible to do pointer swizzling for programs compiled with standard off the shelf compilers. It is only necessary to treat the stack conservatively, as is done by garbage collectors developed for off theshelf compilers [BW88, Bar88, Det90, WH91, Det92] Any bit pattern within the stack which could represent a pointer must be conservatively assumed to be a pointer. The pointed to page is then pinned in the transient address space, because the page can t be relocated without invalidating the (possible) pointer. This does not require the page ....
David L. Detlefs. Garbage collection and runtime typing as a C++ library. In USENIXC++ Conference, Portland, Oregon, August 1992.
....to make it unattractive to most implementors in recent years. As we will explain below, other techniques are usually more efficient and reliable. Still, reference counting has its advantages. The immediacy of reclamation can have advantages for overall memory usage and for locality of reference [DeT90]; a reference counting system may perform with little degradation when almost all of the heap space is occupied by live objects, while other collectors rely on trading more space for higher efficiency. 9 It can also be useful for finalization, that is, performing clean up actions (like closing ....
....of memory, efficiency of simple copying garbage collection is limited by the fact that the system must copy all live data at a collection. In most programs in a variety of languages, most objects live a very short time, while a small percentage of them live much longer [LH83, Ung84, Sha88, Zor90, DeT90, Hay91] While figures vary from language to language and from program to program, usually between 80 and 98 percent of all newly allocated heap objects die within a few million instructions, or before another megabyte has been allocated; the majority of objects die even more quickly, within tens ....
[Article contains additional citation context not shown here]
David L. Detlefs. Garbage collection and runtime typing as a C++ library. In USENIX C++ Conference [USE92].
....of ordinary objects with objects that are automatically garbage collected. This means that a garbage collectable object can be declared and used in roughly the same way as any other object. Being garbage collectable should be mostly orthogonal to existing features of the C programming language [Detlefs 92, Edelson 90] This rules out any form of added formalism deviating from normal C syntax. We currently pursue a telecommunication exchange system application. There, responsiveness i.e. the ability to react to incoming stimuli within a short and predictable interval of time is one of ....
....These subtle requirements originating from C as well as the demand for responsiveness were our main motivation for choosing a simple reference counting scheme. Language Based Implementation To support reference counting in C , the method at hand is to employ so called smart pointers [Detlefs 92, Edelson 92] i.e. reference objects which provide all basic functionality of an ordinary pointer, but transparently carry out additional semantic operations. This can be put nicely into practice, based only on features which are provided by C . We included two different garbage collection ....
D. Detlefs. Garbage Collection and Run-time Typing as a C++ Library. Proc. USENIX C++ Conference, Portland, Oregon, Aug. 1992.
....the coexistence of different garbage collection techniques. The flexibility of the solutions he adopts in his approach allows the coexistence of different garbage collectors, but he does not provide any interface to the user to customise and or define his own memory management facilities. Detlefs [17] proposes the use of smart pointers template classes as an interface for the use of garbage collection in C . Such smart pointers also support run time type queries, giving the program the ability to ascertain the allocated type of an object at run time. The interface is designed as a framework ....
D. L. Detlefs, `Garbage collection and run-time typing as a C++ library', in Proceedings of the 1992 Usenix C++ Conference, (1992).
....In this section we describe the steps of our methodology for transforming a GC dependent implementation into a GC independent one. All of these steps except step 3 can be completely automated in an object oriented language such as C using smart pointer techniques like those described in [2]. However, presenting these steps explicitly is clearer, and allows our methodology to be applied in non objectoriented languages too. The steps are as follows: 1. Add reference counts: Add a field rc to each object type to be used by the implementation. This field should be set to 1 in a ....
D. Detlefs. Garbage collection and run-time typing as a C++ library. In Proceedings of the
....been made are promising [Detlefs 90, Yip 91] 3.4. Smart pointers A number of researchers have investigated so called smart pointers as a means of implementing garbage collection purely at the source language level, without changes to the language or implementations [Edelson 91, Edelson 92, Detlefs 92, Ginter 91] Using operator overloading and template classes or preprocessors, the collectors get notified whenever a smart pointer is created, destroyed, or assigned. But smart pointers don t entirely mimic the functionality of standard pointers. Given class T derived from S, a smart pointer to ....
....coexistence with existing libraries is precluded. Smart pointers provide no automatic safety checking, and they can t prevent unsafe code generator optimizations without doubling the size of pointers, adding run time overhead, and relying on the implementation dependent semantics of volatile [Detlefs 92] Ginter proposes some language changes that would make smart pointers feasible, but that defeats the original goal of avoiding language changes [Ginter 91] In sum, smart pointers are actually rather dumb. 3.5. Pointer declarations Samples has recently proposed adding two new type qualifiers ....
[Article contains additional citation context not shown here]
David L. Detlefs. Garbage collection and run-time typing as a C++ library. In Proceedings of the 1992 Usenix C++ Conference, 1992.
Online articles have much greater impact More about CiteSeer.IST Add search form to your site Submit documents Feedback
CiteSeer.IST - Copyright Penn State and NEC