首页> 外文会议>Proceedings of the 2011 ACM SIGPLAN international conference on functional programming >An Efficient Non-Moving Garbage Collector for Functional Languages
【24h】

An Efficient Non-Moving Garbage Collector for Functional Languages

机译:功能语言的高效非移动垃圾收集器

获取原文
获取原文并翻译 | 示例

摘要

Motivated by developing a memory management system that allows functional languages to seamlessly inter-operate with C, we propose an efficient non-moving garbage collection algorithm based on bitmap marking and report its implementation and performance evaluation. In our method, the heap consists of sub-heaps {H_i | c ≤ i ≤ B} of exponentially increasing allocation sizes (Hi for 2* bytes) and a special sub-heap for exceptionally large objects. Actual space for each sub-heap is dynamically allocated and reclaimed from a pool of fixed size allocation segments. In each allocation segment, the algorithm maintains a bitmap representing the set of live objects. Allocation is done by searching for the next free bit in the bitmap. By adding meta-level bitmaps that summarize the contents of bitmaps hierarchically and maintaining the current bit position in the bitmap hierarchy, the next free bit can be found in a small constant time for most cases, and in log_(32)(segmentSize) time in the worst case on a 32-bit architecture. The collection is done by clearing the bitmaps and tracing live objects. The algorithm can be extended to generational GC by maintaining multiple bitmaps for the same heap space. The proposed method does not require compaction and objects are not moved at all. This property is significant for a functional language to inter-operate with C, and it should also be beneficial in supporting multiple native threads. The proposed method has been implemented in a full-scale Standard ML compiler. Our benchmark tests show that our non-moving collector performs as efficiently as a generational copying collector designed for functional languages.
机译:通过开发允许功能语言与C无缝互操作的内存管理系统,我们提出了一种基于位图标记的有效的固定垃圾收集算法,并报告了其实现和性能评估。在我们的方法中,堆由子堆{H_i | c≤i≤B}的分配大小呈指数增长(Hi为2 *字节),并且有一个特殊的子堆用于异常大的对象。每个子堆的实际空间是动态分配的,并从固定大小的分配段池中回收。在每个分配段中,该算法都维护一个表示活动对象集的位图。通过在位图中搜索下一个空闲位来完成分配。通过添加元级别的位图来汇总位图的内容,并保持位图层次结构中的当前位位置,在大多数情况下,可以在较小的恒定时间内以及log_(32)(segmentSize)时间中找到下一个空闲位。最糟糕的情况是在32位架构上。通过清除位图并跟踪活动对象来完成收集。通过为同一堆空间维护多个位图,可以将该算法扩展到世代GC。所提出的方法不需要压实并且对象完全不移动。此属性对于功能语言与C互操作非常重要,并且在支持多个本机线程中也应是有益的。所提出的方法已在完整的Standard ML编译器中实现。我们的基准测试表明,我们的固定式收集器的性能与为功能语言设计的分代复制收集器一样有效。

著录项

相似文献

  • 外文文献
  • 中文文献
  • 专利
获取原文

客服邮箱:kefu@zhangqiaokeyan.com

京公网安备:11010802029741号 ICP备案号:京ICP备15016152号-6 六维联合信息科技 (北京) 有限公司©版权所有
  • 客服微信

  • 服务号