Floorplan:存储管理系统中的空间布局
Floorplan: Spatial Layout in Memory Management Systems
摘要:
在现代运行时系统中,内存布局计算是用系统语言手工编码的。这些语言中的基元不足以描述丰富的布局集,导致依赖于临时宏、许多相互关联的静态常量和其他样板代码。存储管理策略还必须仔细地编排它们的地址计算的应用,以便协作地修改存储器,这是一项不适合手头缺乏适当的安全机制的低级系统语言的任务。在本文中,我们介绍Floorplan,一个声明性的语言,用于指定高层次的内存布局。以前通过描述如何计算位置来实现的约束在Floorplan中使用显式布局构造以声明方式定义。这里的挑战是发现能够充分实现地址计算的自动生成的构造。Floorplan被实现为一个编译器,用于生成Rust库。在对混合垃圾回收算法的现有实现的案例研究中,Floorplan消除了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.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。