Memory allocation and higher-order functions

O. Danvy
{"title":"Memory allocation and higher-order functions","authors":"O. Danvy","doi":"10.1145/29650.29676","DOIUrl":null,"url":null,"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.","PeriodicalId":414056,"journal":{"name":"SIGPLAN Conferences and Workshops","volume":"212 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"1987-07-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"20","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"SIGPLAN Conferences and Workshops","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1145/29650.29676","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 20

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.
查看原文
分享 分享
微信好友 朋友圈 QQ好友 复制链接
本刊更多论文
内存分配和高阶函数
本文提出了一种恒时标记收集算法,在连续序列频繁捕获的情况下,利用一般堆内存而不是向量堆栈有效地实现递归。它可以将80%的垃圾收集开销平均减少到5%以下。该算法已被构建到一个虚拟机中,以便在汇编级有效地实现Actor语言PLASMA,一个面向Actor的PROLOG版本和SCHEME的变体,目前在8086、68000和Vax上使用。使用堆内存的基本原理是,可以通过统一内存中的单个指针获得延续,并且可以在反复捕获时以最佳方式共享,而使用基于堆栈重新复制的策略根本不可能实现这一点。此外,可以动态地对未捕获的延续进行增量垃圾收集。第一部分描述了虚拟机的基本递归指令。第二部分提出并论证了营销收集策略。第三部分以一种与当前延续的可能捕获兼容的方式安全地概括了“调用+返回=分支”转换。附录介绍了它在支持方案84的虚拟方案机中的集成。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
求助全文
约1分钟内获得全文 去求助
来源期刊
自引率
0.00%
发文量
0
期刊最新文献
A practical method for syntactic error diagnosis and recovery The CIMS PL/I compiler A Fortran 77 interpreter for mutation analysis Cint: a RISC interpreter for the C programming language The Illinois functional programming interpreter
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
现在去查看 取消
×
提示
确定
0
微信
客服QQ
Book学术公众号 扫码关注我们
反馈
×
意见反馈
请填写您的意见或建议
请填写您的手机或邮箱
已复制链接
已复制链接
快去分享给好友吧!
我知道了
×
扫码分享
扫码分享
Book学术官方微信
Book学术文献互助
Book学术文献互助群
群 号:481959085
Book学术
文献互助 智能选刊 最新文献 互助须知 联系我们:info@booksci.cn
Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。
Copyright © 2023 Book学术 All rights reserved.
ghs 京公网安备 11010802042870号 京ICP备2023020795号-1