Compile time garbage collection using reference count analysis
Hederman, Lucy Mary
Master of Arts
Storage management overhead accounts for a considerable proportion of execution time in straightforward implementations of languages with dynamic storage allocation. Our approach to reducing this overhead is to shift some of the work to compile time. With static reference count analysis, we determine when an object becomes inaccessible, and insert explicit deallocation code into the program at those points. This will reduce the frequency and number of garbage collections at run time. We discuss previous approaches to storage analysis and show that reference count analysis can allow more precise modeling of storage accessibility than other approaches. The analysis is extended to the interprocedural case. It is formulated as a set of path problems on a specially designed summary graph. The effectiveness of our implemented optimization on a variety of programs is presented.