|
ABSTRACT
Region-based memory management can be used to control dynamic memory allocations and deallocations safely and efficiently. Existing (direct-style) region systems that statically guarantee region safety---no dereferencing of dangling pointers---are based on refinements of Tofte and Talpin's seminal work on region inference for managing heap memory in stacks of regions.We present a unified Floyd-Hoare Logic inspired region type system for reasoning about and inferring region-based memory management, using a sublanguage of imperative region commands. Our system expresses and performs control-sensitive region management without requiring a stack discipline for allocating and deallocating regions. Furthermore, it captures storage mode analysis and late allocation/early deallocation analysis in a single, expressive, unified logical framework. Explicit region aliasing in combination with reference-counted regions provides flexible, context-sensitive early memory deallocation and simultaneously dispenses with the need for an integrated region alias analysis.In this paper we present the design of our region type system, illustrate its practical expressiveness, compare it to existing region analyses, demonstrate how this eliminates the need for previously required source code rewritings for good memory performance, and describe automatic inference of region commands that give consistently better (or at least equally good) memory performance as existing inference techniques.
REFERENCES
Note: OCR errors may be found in this Reference List extracted from the full text article. ACM has opted to expose the complete List rather than only correct and linked references.
 |
1
|
Alexander Aiken , Manuel Fähndrich , Raph Levien, Better static memory management: improving region-based analysis of higher-order languages, Proceedings of the ACM SIGPLAN 1995 conference on Programming language design and implementation, p.174-185, June 18-21, 1995, La Jolla, California, United States
|
 |
2
|
Lars Birkedal , Mads Tofte , Magnus Vejlstrup, From region inference to von Neumann machines via region representation inference, Proceedings of the 23rd ACM SIGPLAN-SIGACT symposium on Principles of programming languages, p.171-183, January 21-24, 1996, St. Petersburg Beach, Florida, United States
[doi> 10.1145/237721.237771]
|
 |
3
|
Karl Crary , David Walker , Greg Morrisett, Typed memory management in a calculus of capabilities, Proceedings of the 26th ACM SIGPLAN-SIGACT symposium on Principles of programming languages, p.262-275, January 20-22, 1999, San Antonio, Texas, United States
[doi> 10.1145/292540.292564]
|
 |
4
|
|
| |
5
|
|
| |
6
|
F. Henglein, H. Makholm, and H. Niss. A direct approach to control-flow sensitive region-based memory management. Technical report, 2001. hhttp://www.diku.dk/~hniss/rbmm/ppdp-ext.ps.gzi.
|
 |
7
|
|
 |
8
|
|
| |
9
|
J. T. Schwartz. Optimization of very high level languages (parts I and II). Comput. Lang., 1(2 & 3):161--194, 197--218, 1975.
|
 |
10
|
|
| |
11
|
|
| |
12
|
J.-P. Talpin and P. Jouvelot. Polymorphic type, region, and effect inference. J. Func. Prog., 2(3):245--271, 1992.
|
| |
13
|
M. Tofte, L. Birkedal, M. Elsman, N. Hallenberg, T. H. Olesen, P. Sestoft, and P. Bertelsen. Programming with regions in the ML Kit (for version 3). Technical Report DIKU-TR-98/25, Department of Computer Science, University of Copenhagen (DIKU), 1998.
|
| |
14
|
M. Tofte and N. Hallenberg. Region-based memory management in perspective. In F. Henglein, J. Hughes, H. Makholm, and H. Niss, editors, Workshop on Semantics, Program Analysis and Computing Environments for Memory Management (SPACE), pages 23--30, 2001.
|
 |
15
|
|
| |
16
|
|
 |
17
|
|
 |
18
|
|
CITED BY 11
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Michael Hicks , Greg Morrisett , Dan Grossman , Trevor Jim, Experience with safe manual memory-management in cyclone, Proceedings of the 4th international symposium on Memory management, October 24-25, 2004, Vancouver, BC, Canada
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|