Floorplan: spatial layout in memory management systems

Floorplan: spatial layout in memory management systems
复制标题

DOI:
10.1145/3357765.3359519
复制
发表时间:
2019-09
期刊:
Proceedings of the 18th ACM SIGPLAN International Conference on Generative Programming: Concepts and Experiences
影响因子:
--
通讯作者:
Karl Cronburg;Samuel Z. Guyer
Karl Cronburg;Samuel Z. Guyer
中科院分区:
其他
文献类型:
--
作者:
Karl Cronburg;Samuel Z. Guyer

文献摘要

被引文献

相似文献

在现代运行时系统中,内存布局计算是用系统语言手工编码的。这些语言中的原语不足以描述一系列布局,从而依赖临时宏,许多相互关联的静态常数和其他样板代码。内存管理政策还必须仔细协调其地址计算的应用,以便对记忆进行修改,这项任务不适合当前缺乏适当安全机制的低级系统语言。在本文中,我们介绍了平面图,这是一种用于指定高级内存布局的声明语言。以前通过描述如何计算位置在平面图中使用明确的布局结构来确定的约束。这里的挑战是发现能够足够的自动生成地址计算的结构。平面图作为生成锈库的编译器实施。在关于Immix垃圾收集算法现有实施的案例研究中,平面图消除了63条不安全的代码线中的55条:与内存安全有关的不安全线中的100%。
In modern runtime systems, memory layout calculations are hand-coded in systems languages. Primitives in these languages are not powerful enough to describe a rich set of layouts, leading to reliance on ad-hoc macros, numerous interrelated static constants, and other boilerplate code. Memory management policies must also carefully orchestrate their application of address calculations in order to modify memory cooperatively, a task ill-suited to low-level systems languages at hand which lack proper safety mechanisms. In this paper we introduce Floorplan, a declarative language for specifying high level memory layouts. Constraints formerly implemented by describing how to compute locations are, in Floorplan, defined declaratively using explicit layout constructs. The challenge here was to discover constructs capable of sufficiently enabling the automatic generation of address calculations. Floorplan is implemented as a compiler for generating a Rust library. In a case study of an existing implementation of the immix garbage collection algorithm, Floorplan eliminates 55 out of the 63 unsafe lines of code: 100% of unsafe lines pertaining to memory safety.