Language support for regions

Region-based memory management systems structure memory by grouping objects in regions under program control. Memory is reclaimed by deleting regions, freeing all objects stored therein. Our compiler for C with regions, RC, prevents unsafe region deletions by keeping a count of references to each region. Using type annotations that make the structure of a program's regions more explicit, we reduce the overhead of reference counting from a maximum of 27% to a maximum of 11% on a suite of realistic benchmarks. We generalise these annotations in a region type system whose main novelty is the use of existentially quantified abstract regions to represent pointers to objects whose region is partially or totally unknown. A distribution of RC is available at http://www.cs.berkeley.edu/~dgay/rc.tar.gz.

[1]  David Walker,et al.  Alias Types for Recursive Data Structures (Extended Version) , 2000 .

[2]  David R. Hanson Fast allocation and deallocation of memory based on object lifetimes , 1990, Softw. Pract. Exp..

[3]  Daniel G. Bobrow,et al.  Managing Reentrant Structures Using Reference Counts , 1980, ACM Trans. Program. Lang. Syst..

[4]  Robert DeLine,et al.  Enforcing high-level protocols in low-level software , 2001, PLDI '01.

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

[6]  Jerome A. Feldman,et al.  Portable, modular expression of locality , 1997 .

[7]  David Walker,et al.  Typed memory management in a calculus of capabilities , 1999, POPL '99.

[8]  Paul R. Wilson,et al.  Dynamic Storage Allocation: A Survey and Critical Review , 1995, IWMM.

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

[10]  Douglas T. Ross The AED free storage package , 1967, CACM.

[11]  Kiem-Phong Vo,et al.  Vmalloc: A General and Efficient Memory Allocator , 1996, Softw. Pract. Exp..

[12]  Stephen M. Omohundro,et al.  The Sather 1.1 Specification , 1996 .

[13]  Alex Aiken,et al.  Language Support and Compilation Techniques for Regions , 2000 .

[14]  Akinori Yonezawa,et al.  Distributed Garbage Collection Using Group Reference Counting , 1991, Software Science and Engineering.

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

[16]  David Walker,et al.  Alias Types for Recursive Data Structures , 2000, Types in Compilation.

[17]  Christopher W. Fraser,et al.  A Retargetable C Compiler: Design and Implementation , 1995 .

[18]  Benjamin G. Zorn,et al.  Using lifetime predictors to improve memory allocation performance , 1993, PLDI '93.