Memory allocation and higher-order functions
- 1 July 1987
- journal article
- Published by Association for Computing Machinery (ACM) in ACM SIGPLAN Notices
- Vol. 22 (7) , 241-252
- https://doi.org/10.1145/960114.29676
Abstract
This paper presents a constant-time marking-collecting algorithm to efficiently implement recursion with a general heap memory rather than with a vectorial stack, in a context of frequent captures of continuations. It has been seen to reduce the 80% garbage collection overhead to less than 5% on average.The algorithm has been built into a virtual machine to efficiently implement at the assembly level the Actor language PLASMA, an Actor-oriented version of PROLOG and a variant of SCHEME, currently in use on 8086, 68000 and Vax.The rationale to use the heap memory is that continuations are available via a single pointer in a unified memory and can be shared optimally when recurrently captured, which is simply impossible using a strategy based on stack recopy. Further, non-captured continuations can be incrementally garbage collected on the fly.Part I describes the elementary recursive instructions of the virtual machine. Part II presents and proves the marking-collecting strategy. Part III safely generalizes the transformation "call + return = branch" in a way compatible with the possible capture of the current continuation. An appendix relates its integration in the Virtual Scheme Machine supporting Scheme 84.This publication has 9 references indexed in Scilit:
- Memory allocation and higher-order functionsPublished by Association for Computing Machinery (ACM) ,1987
- The implementation of PC SchemePublished by Association for Computing Machinery (ACM) ,1986
- Constraining controlPublished by Association for Computing Machinery (ACM) ,1985
- Efficient implementation of the smalltalk-80 systemPublished by Association for Computing Machinery (ACM) ,1984
- Recursion is more efficient than iterationPublished by Association for Computing Machinery (ACM) ,1984
- Engines build process abstractionsPublished by Association for Computing Machinery (ACM) ,1984
- Programming with ContinuationsPublished by Springer Nature ,1984
- An efficient environment allocation scheme in an interpreter for a lexically-scoped LISPPublished by Association for Computing Machinery (ACM) ,1980
- The contour model of block structured processesACM SIGPLAN Notices, 1971