ABSTRACT
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 style 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.
- 1.Standard X3.159-1989, American National $tan. dard for Information Systems - Programming Language - C, American National Standards Institute, Inc.Google Scholar
- 2.Atkinson, Russ, Alan Demers, Carl Hauser, Christian Jacobi, Peter Kessler, and Mark Weiser, "Experiences Creating a Portable Cedar", Proceedings of the A CM SIGPLAN '89 Conference on Programming Language Design and Implementation, $IG- PLAN Notices 2j, 7 (July 1989), pp. 322-329. Google ScholarDigital Library
- 3.Bartlett, Joel F. "Compacting garbage collection with ambiguous roots", Lisp Pointers 1, 6 (April- June 1988), pp. 3-12.Google Scholar
- 4.Bartlett, Joel F., Scheme -> C a Portable Schemeto-C Compiler, WRL Research Report 89/1, Digital Equipment Corporation Western Research Laboratory, January 1989.Google Scholar
- 5.Bartlett, Joel F., Mostly Copying Garbage Collection Picks Up Generations and C++, Technical Report TN-12, Digital Equipment Corporation Western Research Laboratory, October 1989.Google Scholar
- 6.Bekkers, Y., O. Ridoux, and L. Ungaro, "Dynamic Memory Management for Sequential Logic Programming Languages, Proceedings of the International Workshop on Memory Management, St. Malo, France, September 1992, Springer LNCS 637, pp. 82-102. Google ScholarDigital Library
- 7.Boehm, Hans-J., and David Chase, "A Proposal for Garbage-Collector-Safe C Compilation", The Journal of C Language Translation d, 2 (December 1992), pp. 126-141.Google Scholar
- 8.Boehm, H., A. Demers, and S. Shenker,"Mostly Parallel Garbage Collection", Proceedings of the A CM $IGPLAN '9I Conference on Programming Language Design and Implementation, SIGPLAN Notices 26, 6 (June 1991), pp. 157-164. Google ScholarDigital Library
- 9.Boehm, Hans-J. and Mark Weiser, "Garbage collection in an uncooperative environment", Software Practice ~4 E~perience 18, 9 (Sept. 1988), pp. 807- 820. Google ScholarDigital Library
- 10.Chailloux, Emmanuel, "A Conservative Garbage Collector with Ambiguous Roots for Static Typechecking Languages", Proceedings of the International Workshop on Memory Management, St. Malo, France, September 1992, Springer LNCS 637, pp. 218-229. Google ScholarDigital Library
- 11.Cridlig, Regis, "An Optimizing ML to C Compiler'', A CM SIGPLAN Workshop on ML and its Applications, San Francisco, June 1992, David MacQueen, chair.Google Scholar
- 12.A. Demers, M. Weiser, B. Hayes, H. Boehm, D. Bobrow, S. Shenker, "Combining Generational and Conservative Garbage Collection: Framework and Implementations", Proceedings of the Seventeenth Annual A CM Symposium on Principles of Programming Languages, January 1990, pp. 261-269. Google ScholarDigital Library
- 13.Detlefs, David L., "Concurrent Garbage Collection for C++", in Advanced Programming Language implementation, Peter Lee, ed., MIT Press, 1991.Google Scholar
- 14.Edelson, Daniel, "A Mark-and-Sweep Collector for C++", Conference Record of the Nineteenth Annual A CM $I(TPLAN-SIGA CT Symposium on Principles of Programming Languages, Albuquerque, New Mexico, January 1992, pp. 51-58. Google ScholarDigital Library
- 15.Goldberg, Benjamin, and Michael Gloger, "Polymorphic Type Reconstruction for Garbage Collection without Tags", Proceedings of the 199~ ACM Conference on Lisp and Functional Programming, pp. 53-65. Google ScholarDigital Library
- 16.Hastings, Reed, and Bob Joyce, "Fast Detection of Memory Leaks and Access Errors", Proceedings of the Winter '92 USENIX conference, pp. 125-136.Google Scholar
- 17.Omohundro, Stephen M., The Sather Language, ICSI, Berkeley, 1991.Google Scholar
- 18.Rose, John R., and Hans Muller, "Integrating the Scheme and C languages", Proceedings of the 1992 A CM Conference on Lisp and Functional Programming, pp. 247-259. Google ScholarDigital Library
- 19.Rovner, Paul, "On Adding Garbage Collection and Runtime Types to a Strongly-Typed Statically Checked, Concurrent Language", Technical Report CSL-84-7, Xerox Palo Alto Research Center, Palo Alto, CA, July 1985.Google Scholar
- 20.Ungar, David M., "Generation Scavenging: A Non- Disruptive High Performance Storage Reclamation Algorithm", A CM SIGSOFT/SIGPLAN Software Engineering Symposium on Practical Software Development Environments, SIGPLAN Notices 19, 5 (May 1984), pp. 157-167. Google ScholarDigital Library
- 21.Schelter, W. F., and M. Ballantyne, "Kyoto Common Lisp", AI Expert 3 3 (1988), pp. 75-77. Google ScholarDigital Library
- 22.Weiser, Mark, Alan Demers, and Carl Hauser, "The Portable Common Runtime Approach to interoperability", Proceedings 13th A CM Symposium on Operating Systems Principles, December 1989. Google ScholarDigital Library
- 23.Wentworth, E. P., "Pitfalls of Conservative Garbage Collection", Software Practice ~4 Emperience 20, 7 (July 1990)pp. 719-727. Google ScholarDigital Library
- 24.Wilson, Paul R., "Uniprocessor Garbage Collection Techniques", Proceedings of the international Workshop on Memory Management, St. Malo, France, September 1992, Springer LNCS 637, pp. 1-42. Google ScholarDigital Library
- 25.Zorn, Benjamin, "The Measured Cost of Conservative Garbage Collection", University of Colorado at Boulder, Department of Computer Science Technical Report CU-CS-573-92.Google Scholar
Index Terms
- Space efficient conservative garbage collection
Recommendations
Space efficient conservative garbage collection
20 Years of the ACM SIGPLAN Conference on Programming Language Design and Implementation 1979-1999: A SelectionBoth type-accurate and conservative garbage collectors have gained in importance since the original paper was written. Managing unnecessary retention by conservative collectors continues to be an important problem. There appear to be few ...
Combining generational and conservative garbage collection: framework and implementations
POPL '90: Proceedings of the 17th ACM SIGPLAN-SIGACT symposium on Principles of programming languagesTwo key ideas in garbage collection are generational collection and conservative pointer-finding. Generational collection and conservative pointer-finding are hard to use together, because generational collection is usually expressed in terms of copying ...
Space efficient conservative garbage collection
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, ...
Comments