摘要
引用计数垃圾收集器通常具有增量式和实时性特征,但存在垃圾收集器中断执行程序时间较长的情况。本文实现了一个并发引用计数垃圾收集器,使得垃圾收集器和工作程序并发执行,避免了垃圾收集器中断执行程序。基于C++的语法标准和应用编程接口,无需修改编译器和存储分配器,且收集器和工作程序的同步是锁免除的。Linux操作系统中的实现和实验表明,收集器有极低(低于0.2%)的处理器损失。
Reference-counting garbage collector has incremental nature of most of its operation and can easily satisfy real-time requirements. However, there are cases in which garbage collection interruptions can be long. This paper implements a concurrent reference-counting garbage collector for C + + , which can avoid the cases where collector internlpts mutators. The implementation is based on C = + grammar standards and application programming interfaces, so it is no need to modify compiler and memory allocator. The cooperation between collector and mutator is lock-free. The implementation and experiments in Linux OS show that the CPU cost is extreme low( less than 0.2% ).
出处
《安庆师范学院学报(自然科学版)》
2014年第3期54-58,共5页
Journal of Anqing Teachers College(Natural Science Edition)
关键词
引用计数
垃圾收集
工作程序
并发
锁免除
reference-counting, garbage collector, mutator, concurrent, lock-free