Region-based Memory Management

  title={Region-based Memory Management},
  author={Mads Tofte and Jean-Pierre Talpin},
  journal={Inf. Comput.},
This paper describes a memory management discipline for programs that perform dynamic memory allocation and de-allocation. At runtime, all values are put intoregions. The store consists of a stack of regions. All points of region allocation and de-allocation are inferred automatically, using a type and effect based program analysis. The scheme does not assume the presence of a garbage collector. The scheme was first presented in 1994 (M. Tofte and J.-P. Talpin,in“Proceedings of the 21st ACM… 

Figures from this paper

A type system for safe memory management and its proof of correctness

It is proved that, in spite of sharing and of the use of implicit and explicit memory deallocation operations, all well-typed programs will be free of dangling pointers at runtime.

Safe Memory Regions for Big Data Processing

A refinement-based region type system that ensures the memory safety of C# programs in the presence of transferable regions and complements this type system with a type inference algorithm that infers principal region types for first-order programs, and practically useful types for higherorder programs.

Region-based memory management for Mercury programs. Part 1: Region analysis and transformation

This report contains a static region analysis for the logic programming language Mercury that defines region points-to graphs, which represent the locations of terms and the sharing among them, to model the partitioning of the memory used by a program into separate regions.

Automatic memory management techniques for the go programming language

This thesis investigates the less common form of automated memory management (region-based) within the context of the relatively new concurrent language Go, and investigates combining both techniques, in a new way, with hopes of achieving the benefits of a combined system without the drawbacks that each automated technique provides alone.

Efficient memory-reference checks for real-time java

This paper presents efficient algorithms for managing scoped memories and the checks they impose on programs and describes the approach and presents experiments quantifying the gains in efficiency.

Region-Based Memory Management in Java

A Java-like language in which objects are explicitly put in regions, which has constructs for allocating, updating and deallocating regions, as well as region types for objects and a soundness theorem stating that well-typed programs do not go wrong is presented.

Region-Based Memory Management for the Logic Programming Language Mercury

This thesis has developed program analyses that determine the distribution of data over regions as well as their lifetimes in a Mercury program and provides the correctness proofs of the related program analyses and transformation, which guarantee the safeness of memory accesses in annotated programs.

Safety properties and memory bound analysis in a functional language without a garbage collector

The first goal of this thesis is to develop a static analysis for guaranteeing the safety of a program with regard to its memory accesses (specifically, the absence of dangling pointers), and an abstract interpretation-based analysis for inferring upper bounds to the memory needs of a programs.

Region Type Checking for Core-Java

This paper proposes a region-based memory management system for a core subset of Java that can completely prevent dangling references and thus is ready to cater for the no-dangling requirement in RTSJ.

Towards region-based memory management for Go

A novel design for region-based memory management for Go is presented, combining static analysis, to guide region creation, and lightweight runtime bookkeeping, to help control reclamation, making the approach more practical than existing RBMM systems.



Better static memory management: improving region-based analysis of higher-order languages

This work improves upon the Tofte/Talpin region-based scheme for compile-time memory management and reduces memory requirements significantly, in some cases asymptotically.

An Optimizing Backend for the ML Kit Using a Stack of Regions

This work presents an optimizing backend for the ML Kit compiler building on region inference, and implements a code generator for the HPPA RISC architecture and experiments show that it in some cases generate faster code than the Standard ML of New Jersey compiler.

A theory of stack allocation in polymorphically typed languages

The main result of this report is that region inference is safe, a result which entails that regions really can be deallocated, when region inference says they can.

List Processing in Real Time on a Serial Computer

A real-time list processing system is presented which continuously reclaims garbage, including directed cycles, while linearizing and compacting the accessible cells into contiguous locations to avoid fragmenting the free storage pool.

Polymorphic type, region and effect inference

A new static system which reconstructs the types, regions and effects of expressions in an implicitly typed functional language that supports imperative operations on reference values, and proves the correctness of the reconstruction algorithm with respect to the static semantics.

A Region Profiler for a Standard ML compiler based on Region Inference

The region prooler used in the ML Kit (a Standard ML compiler that uses region inference, 7] is presented, based on work done by Colin Runciman and David Wakeling on a heap prooler for lazy functional programs.

Types and Effects Towards the Integration of Functional and Imperative Programming.

The type and effect system makes it possible to embed functional program fragments within imperative programs, and vice versa, while retaining the benefits of the chosen programming style in each program fragment, and offers a clean solution to the problem of first-class polymorphism in an imperative language.

A real-time garbage collector based on the lifetimes of objects

This work presents a garbage collection algorithm that makes storage for short-lived objects cheaper than storage for long-livedObjects, that operates in real time, increases locality of reference, for better virtual memory performance, and works well with multiple processors and a large address space.

From region inference to von Neumann machines via region representation inference

This paper is concerned with mapping the mathematical model of region inference onto real machines by composing region inference with Region Representation Inference, which gradually refines region information till it is directly implementable on conventional von Neumann machines.

A Theory of Type Polymorphism in Programming

  • R. Milner
  • Computer Science
    J. Comput. Syst. Sci.
  • 1978