TY - GEN
T1 - An efficient non-moving garbage collector for functional languages
AU - Ueno, Katsuhiro
AU - Ohori, Atsushi
AU - Otomo, Toshiaki
PY - 2011
Y1 - 2011
N2 - Motivated by developing a memory management system that al-lows 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 {Hi i c ≤ i ≤ B} of exponentially increasing allocation sizes (Hi for 2i 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 log32(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.
AB - Motivated by developing a memory management system that al-lows 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 {Hi i c ≤ i ≤ B} of exponentially increasing allocation sizes (Hi for 2i 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 log32(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.
KW - Bitmap marking
KW - Generational collectors
KW - Non-moving garbage collection
KW - SML#
UR - http://www.scopus.com/inward/record.url?scp=80054054748&partnerID=8YFLogxK
UR - http://www.scopus.com/inward/citedby.url?scp=80054054748&partnerID=8YFLogxK
U2 - 10.1145/2034773.2034802
DO - 10.1145/2034773.2034802
M3 - Conference contribution
AN - SCOPUS:80054054748
SN - 9781450308656
T3 - Proceedings of the ACM SIGPLAN International Conference on Functional Programming, ICFP
SP - 196
EP - 208
BT - ICFP'11 - Proceedings of the 2011 ACM SIGPLAN International Conference on Functional Programming
T2 - 16th ACM SIGPLAN International Conference on Functional Programming, ICFP'11
Y2 - 19 September 2011 through 21 September 2011
ER -