Combining region inference and garbage collection

This paper describes a memory discipline that combines region-based memory management and copying garbage collection by extending Cheney's copying garbage collection algorithm to work with regions. The paper presents empirical evidence that region inference very significantly reduces the number of garbage collections; and evidence that the fastest execution is obtained by using regions alone, without garbage collection. The memory discipline is implemented for Standard ML in the ML Kit compiler and measurements show that for a variety of benchmark programs, code generated by the compiler is as efficient, both with respect to execution time and memory usage, as programs compiled with Standard ML of New Jersey, another state-of-the-art Standard ML compiler.

[1]  David Gay,et al.  Memory management with explicit regions , 1998, PLDI.

[2]  Martin Elsman,et al.  An Optimizing Backend for the ML Kit Using a Stack of Regions , 1995 .

[3]  James Cheney,et al.  Region-based memory management in cyclone , 2002, PLDI '02.

[4]  Niels Hallenberg,et al.  Combining Garbage Collection and Region Inference in The ML Kit , 1999 .

[5]  Martin Elsman,et al.  Programming with regions in the ml kit (for version 4) , 1998 .

[6]  Mads Tofte,et al.  Implementation of the typed call-by-value λ-calculus using a stack of regions , 1994, POPL '94.

[7]  Mads Tofte,et al.  Region-based Memory Management , 1997, Inf. Comput..

[8]  Paul R. Wilson,et al.  Uniprocessor Garbage Collection Techniques , 1992, IWMM.

[9]  Chris J. Cheney A nonrecursive list compacting algorithm , 1970, Commun. ACM.

[10]  Lars Birkedal,et al.  From region inference to von Neumann machines via region representation inference , 1996, POPL '96.

[11]  Lars Birkedal,et al.  A region inference algorithm , 1998, TOPL.

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

[13]  Henry Lieberman,et al.  A real-time garbage collector based on the lifetimes of objects , 1983, CACM.

[14]  Bruno Blanchet,et al.  Escape analysis: correctness proof, implementation and experimental results , 1998, POPL '98.

[15]  Martin Elsman Static interpretation of modules , 1999, ICFP '99.

[16]  Mads Tofte,et al.  A theory of stack allocation in polymorphically typed languages , 1993 .

[17]  Martin Elsman Polymorphic Equality - No Tags Required , 1998, Types in Compilation.

[18]  David Gay,et al.  Language support for regions , 2001, PLDI '01.

[19]  Alexander Aiken,et al.  Better static memory management: improving region-based analysis of higher-order languages , 1995, PLDI '95.

[20]  Andrew W. Appel,et al.  Type-preserving garbage collectors , 2001, POPL '01.

[21]  Robin Milner,et al.  Definition of standard ML , 1990 .

[22]  Niels Hallenberg A Region Profiler for a Standard ML compiler based on Region Inference , 1996 .