Bounding space usage of conservative garbage collectors

Conservative garbage collectors can automatically reclaim unused memory in the absence of precise pointer location information. If a location can possibly contain a pointer, it is treated by the collector as though it contained a pointer. Although it is commonly assumed that this can lead to unbounded space use due to misidentified pointers, such extreme space use is rarely observed in practice, and then generally only if the number of misidentified pointers is itself unbounded.We show that if the program manipulates only data structures satisfying a simple GC-robustness criterion, then a bounded number of misidentified pointers can at most result in increasing space usage by a constant factor. We argue that nearly all common data structures are already GC-robust, and it is typically easy to identify and replace those that are not. Thus it becomes feasible to prove space bounds on programs collected by mildly conservative garbage collectors, such as the one in [2]. The worst-case space overhead introduced by such mild conservatism is comparable to the worst-case fragmentation overhead for inherent in any non-moving storage allocator.The same GC-robustness criterion also ensures the absence of temporary space leaks of the kind discussed in [13] for generational garbage collectors.

[1]  William D. Clinger,et al.  Proper Tail Recursion and Space Eeciency , 1998 .

[2]  Hans-Juergen Boehm,et al.  Understanding memory allocation of scheme programs , 2000, ICFP '00.

[3]  E. P. Wentworth Pitfalls of conservative garbage collection , 1990, Softw. Pract. Exp..

[4]  Amer Diwan,et al.  On the type accuracy of garbage collection , 2000, ISMM '00.

[5]  Sheng Liang,et al.  Java Native Interface: Programmer's Guide and Reference , 1999 .

[6]  Niv Buchbinder,et al.  Mostly Accurate Stack Scanning , 2001, Java Virtual Machine Research and Technology Symposium.

[7]  Niklas Röjemo,et al.  Generational Garbage Collection without Temporary Space Leaks for Lazy Functional Languages , 1995, IWMM.

[8]  David S. Johnson,et al.  Computers and Intractability: A Guide to the Theory of NP-Completeness , 1978 .

[9]  John Michael Robson,et al.  Bounds for Some Functions Concerning Dynamic Storage Allocation , 1974, JACM.

[10]  Carl H. Hauser,et al.  The portable common runtime approach to interoperability , 1989, SOSP '89.

[11]  Joel F. Bartlett,et al.  Compacting garbage collection with ambiguous roots , 1988, LIPO.

[12]  William D. Clinger Proper tail recursion and space efficiency , 1998, PLDI.

[13]  J. Boehm Space Eecient Conservative Garbage Collection , 1993 .

[14]  Andrew W. Appel,et al.  Compiling with Continuations , 1991 .

[15]  J. Eliot B. Moss,et al.  Incremental Collection of Mature Objects , 1992, IWMM.

[16]  David R. Chase,et al.  Safety consideration for storage allocation optimizations , 1988, PLDI '88.

[17]  Sheng Liang,et al.  Java Native Interface: Programmer's Guide and Specification , 1999 .

[18]  John Michael Robson,et al.  An Estimate of the Store Size Necessary for Dynamic Storage Allocation , 1971, JACM.