引用本文: | 吴昊,季振洲.一种基于半空间的不完全拷贝垃圾回收机制[J].哈尔滨工业大学学报,2011,43(11):60.DOI:10.11918/j.issn.0367-6234.2011.11.013 |
| WU Hao,JI Zhen-zhou.Partial copying garbage collection mechanism based on semispace[J].Journal of Harbin Institute of Technology,2011,43(11):60.DOI:10.11918/j.issn.0367-6234.2011.11.013 |
|
摘要: |
为了满足半空间拷贝垃圾回收的实时性需求,克服在半空间拷贝回收过程中因大量的内存拷贝操作带来的时间开销方面的不足,提出了一种将对象分类并进行不完全拷贝的回收机制.针对大对象的生命周期较长及空间分布的连续性特点,在半空间拷贝回收的遍历阶段,对活动的大对象采取只标记不拷贝的策略,被标记的对象仍留在起始空间,通过增加一个整理阶段维护了较低水平的内存碎片程度.SPECjvm2008和Dacapo两项基准测试验证了提出的方法的有效性,对比实验结果表明相比半空间拷贝回收,有效地降低了回收的平均时间开销,提高了半空间垃圾回收的实时性. |
关键词: 垃圾回收 半空间拷贝 实时系统 Java虚拟机 |
DOI:10.11918/j.issn.0367-6234.2011.11.013 |
分类号:TP312.1 |
基金项目:国家自然科学基金资助项目(60475012) |
|
Partial copying garbage collection mechanism based on semispace |
WU Hao, JI Zhen-zhou
|
School of Computer Science and Technology,Harbin Institute of Technology,150001 Harbin,China
|
Abstract: |
To meet the needs of real-time characteristics as well as to overcome the time overhead caused by memory copying operations during the process of semispace collection,an improved method was proposed which was based on partial copying mechanism.Based on the fact that the large objects are always long-lived objects as well as distributed continuously in memory space,the lived large objects will only be marked without being moved during the collection phase of semispcae GC.The marked objects remain in the original space,and a compaction phase is added to maintain a low degree of memory fragmentation.SPECjvm2008 and Dacapo test suites are used to demonstrate the effectiveness of the proposed algorithm.Comparison experiments shows that proposed method can efficiently reduce the average pause time of the collection and ensure the realtimeness for semispace garbage collection. |
Key words: garbage collection semispace copying real-time system Java JVM |