Existing techniques for garbage collection and machine code optimizations can interfere with each other. The inability to fully optimize code in a garbage-collected system is a hidden cost of garbage collection. One solution to this problem is proposed; an inexpensive protocol that permits most optimizations and garbage collection to coexist.
A second approach to this problem and a separate problem in its own right is to reduce the need for garbage collection. This requires analysis of storage lifetime. Inferring storage lifetime is difficult in a language with nested and recursive data structures, but it is precisely these languages in which garbage collection is most useful. An improved analysis for "storage containment" is described.
Containment information can be represented in a directed graph. The derivation of this graph falls into a monotone data-flow analysis framework; in addition, the derivation has the Church-Rosser property. The graphs produced in the analysis of a value-assignment language have the property that they can be replaced with a single graph without losing any information. These properties also assist in the generation of graphs for side-effect languages.
A different approach to avoiding obtaining memory from the garbage collector is also proposed. Existing techniques are either not general or run the risk of consuming all of a bounded memory. A general, low overhead technique that does not consume excessive amounts of memory is described.
Cited By
- Chase D, Wegman M and Zadeck F (2004). Analysis of pointers and structures, ACM SIGPLAN Notices, 39:4, (343-359), Online publication date: 1-Apr-2004.
- Cannarozzi D, Plezbert M and Cytron R Contaminated garbage collection Proceedings of the ACM SIGPLAN 2000 conference on Programming language design and implementation, (264-273)
- Cannarozzi D, Plezbert M and Cytron R (2019). Contaminated garbage collection, ACM SIGPLAN Notices, 35:5, (264-273), Online publication date: 1-May-2000.
- Baker H (1992). CONS should not CONS its arguments, or, a lazy alloc is a smart alloc, ACM SIGPLAN Notices, 27:3, (24-34), Online publication date: 1-Mar-1992.
- Baker H (1992). The treadmill, ACM SIGPLAN Notices, 27:3, (66-70), Online publication date: 1-Mar-1992.
- Hölzle U, Chambers C and Ungar D Debugging optimized code with dynamic deoptimization Proceedings of the ACM SIGPLAN 1992 conference on Programming language design and implementation, (32-43)
- Park Y and Goldberg B Escape analysis on lists Proceedings of the ACM SIGPLAN 1992 conference on Programming language design and implementation, (116-127)
- Hölzle U, Chambers C and Ungar D (2019). Debugging optimized code with dynamic deoptimization, ACM SIGPLAN Notices, 27:7, (32-43), Online publication date: 1-Jul-1992.
- Park Y and Goldberg B (1992). Escape analysis on lists, ACM SIGPLAN Notices, 27:7, (116-127), Online publication date: 1-Jul-1992.
- Baker H (1992). Lively linear Lisp, ACM SIGPLAN Notices, 27:8, (89-98), Online publication date: 1-Aug-1992.
- Baker H Unify and conquer Proceedings of the 1990 ACM conference on LISP and functional programming, (218-226)
- Chase D, Wegman M and Zadeck F Analysis of pointers and structures Proceedings of the ACM SIGPLAN 1990 conference on Programming language design and implementation, (296-310)
- Chase D, Wegman M and Zadeck F (1990). Analysis of pointers and structures, ACM SIGPLAN Notices, 25:6, (296-310), Online publication date: 1-Jun-1990.
- Humphrey S and Krovetz B (1989). Selected AI-Related Dissertations, ACM SIGART Bulletin:109, (89-97), Online publication date: 1-Jul-1989.
- Horwitz S, Pfeiffer P and Reps T Dependence analysis for pointer variables Proceedings of the ACM SIGPLAN 1989 conference on Programming language design and implementation, (28-40)
- Horwitz S, Pfeiffer P and Reps T (2019). Dependence analysis for pointer variables, ACM SIGPLAN Notices, 24:7, (28-40), Online publication date: 1-Jul-1989.
- Chase D Safety consideration for storage allocation optimizations Proceedings of the ACM SIGPLAN 1988 conference on Programming language design and implementation, (1-10)
- Chase D (2019). Safety consideration for storage allocation optimizations, ACM SIGPLAN Notices, 23:7, (1-10), Online publication date: 1-Jul-1988.
Recommendations
Age-based garbage collection
Modern generational garbage collectors look for garbage among the young objects, because they have high mortality; however, these objects include the very youngest objects, which clearly are still live. We introduce new garbage collection algorithms, ...
Analysis and Optimizations of Java Full Garbage Collection
APSys '18: Proceedings of the 9th Asia-Pacific Workshop on SystemsJava runtime frees applications from manual memory management by its automatic garbage collection (GC), at the cost of stop-the-world pauses. State-of-the-art collectors leverage multiple generations, which will inevitably suffer from a full GC phase ...
Age-based garbage collection
OOPSLA '99: Proceedings of the 14th ACM SIGPLAN conference on Object-oriented programming, systems, languages, and applicationsModern generational garbage collectors look for garbage among the young objects, because they have high mortality; however, these objects include the very youngest objects, which clearly are still live. We introduce new garbage collection algorithms, ...