論文

査読有り
2011年9月

An Efficient Non-Moving Garbage Collector for Functional Languages

ACM SIGPLAN NOTICES
  • Katsuhiro Ueno
  • ,
  • Atsushi Ohori
  • ,
  • Toshiaki Otomo

46
9
開始ページ
196
終了ページ
208
記述言語
英語
掲載種別
研究論文(学術雑誌)
DOI
10.1145/2034574.2034802
出版者・発行元
ASSOC COMPUTING MACHINERY

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 vertical bar c <= i <= B} of exponentially increasing allocation sizes (H-i for 2(i) 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.

リンク情報
DOI
https://doi.org/10.1145/2034574.2034802
Web of Science
https://gateway.webofknowledge.com/gateway/Gateway.cgi?GWVersion=2&SrcAuth=JSTA_CEL&SrcApp=J_Gate_JST&DestLinkType=FullRecord&KeyUT=WOS:000297632700020&DestApp=WOS_CPL
ID情報
  • DOI : 10.1145/2034574.2034802
  • ISSN : 0362-1340
  • eISSN : 1558-1160
  • Web of Science ID : WOS:000297632700020

エクスポート
BibTeX RIS