Region-Based Memory Management
for a Dynamically-Typed Language
Akihito Nagata†, Naoki Kobayashi††, Akinori Yonezawa†
†
Dept. of Computer Science, Graduate School of Information Science and
Technology, University of Tokyo
††
Dept. of Computer Science, Graduate School of Information Science and
Engineering, Tokyo Institute of Technology
Abstract
Region-based memory management scheme has been proposed for
programming language ML. In this scheme, a compiler statically estimates
the live range of each object by performing an extension of type
inference (called region inference) and inserts code for memory
allocation and deallocation. Advantages of this scheme are that
memory objects can be deallocated safely (unlike with manual memory
management using malloc/free) and often earlier than
with run-time garbage collection.
Since the region inference is an extension
of the ML type inference, however, it was not clear whether the
region-based memory management was applicable to dynamically-typed
programming languages like Scheme. In this paper, we show that the
region-based memory management can be applied to dynamically-typed
languages by combining region inference and Cartwright et al.'s soft
type system.
Papers
-
Akihito Nagata, Naoki Kobayashi, Akinori Yonezawa,
"Region-Based Memory Management for a Dynamically-Typed Language".
(PS,
PDF)
Implementation
Only the program translater is available, now.
download
Download and extract it, and execute
> make
(Objective Caml is required).
And region-scheme will be built. Try it as
> ./region-scheme example/fib.scm
Compiler implementation will be available soon.
Mail : Akihito Nagata.