arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 1804.04812cs.PL
收藏

一种扩展的低脂分配器API及其应用

An Extended Low Fat Allocator API and Applications

Gregory J. Duck, Roland H. C. Yap

摘要:

内存分配器的主要功能是主要通过malloc API分配和释放内存块。许多内存分配器还实现了其他API扩展,例如从对象的指针中导出已分配对象的大小,或者从内部指针计算分配的基址。在本文中,我们提出了一个通用的扩展分配器API围绕这些常见的扩展。我们认为,这种扩展的API有许多应用程序,并展示了几个用例,如(手动)内存错误检测,Meta数据存储,类型指针和紧凑的数据结构。因为大多数现有的分配器不是为扩展API设计的,所以传统的实现是昂贵的或不可能的。最近,开发了用于堆和堆栈对象的LowFat分配器。LowFat分配器是低脂肪指针思想的实现,其中对象边界信息(大小和基)被编码到本机指针表示本身中。低脂指针的“杀手级应用”是用于程序加固和bug检测的自动边界检查工具。然而,LowFat分配器也可以用于实现高度优化的扩展分配器API版本,这使得新的应用程序(上面列出的)成为可能。在本文中,我们实现和评估几个应用程序的高效内存分配器API扩展使用低脂肪指针。我们还扩展了LowFat分配器,首次覆盖了全局对象。

英文摘要:

The primary function of memory allocators is to allocate and deallocate chunks of memory primarily through the malloc API. Many memory allocators also implement other API extensions, such as deriving the size of an allocated object from the object's pointer, or calculating the base address of an allocation from an interior pointer. In this paper, we propose a general purpose extended allocator API built around these common extensions. We argue that such extended APIs have many applications and demonstrate several use cases, such as (manual) memory error detection, meta data storage, typed pointers and compact data-structures. Because most existing allocators were not designed for the extended API, traditional implementations are expensive or not possible. Recently, the LowFat allocator for heap and stack objects has been developed. The LowFat allocator is an implementation of the idea of low-fat pointers, where object bounds information (size and base) are encoded into the native machine pointer representation itself. The "killer app" for low-fat pointers is automated bounds check instrumentation for program hardening and bug detection. However, the LowFat allocator can also be used to implement highly optimized version of the extended allocator API, which makes the new applications (listed above) possible. In this paper, we implement and evaluate several applications based efficient memory allocator API extensions using low-fat pointers. We also extend the LowFat allocator to cover global objects for the first time.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑