作者投稿和查稿 主编审稿 专家审稿 编委审稿 远程编辑

计算机工程 ›› 2012, Vol. 38 ›› Issue (7): 46-48. doi: 10.3969/j.issn.1000-3428.2012.07.016

• 软件技术与数据库 • 上一篇    下一篇

基于嵌入式Java虚拟机的垃圾收集优化算法

吴志军1,何加铭1,2,曾兴斌1,史智慧3   

  1. (1. 宁波大学通信技术研究所,浙江 宁波 315211;2. 浙江省移动网应用技术重点实验室,浙江 宁波 315211; 3. 宁波新然电子信息科技发展有限公司,浙江 宁波 315211)
  • 收稿日期:2011-07-04 出版日期:2012-04-05 发布日期:2012-04-05
  • 作者简介:吴志军(1987-),男,硕士,主研方向:嵌入式系统,虚拟机技术;何加铭,教授;曾兴斌,副教授;史智慧,硕士
  • 基金资助:
    国家科技重大专项基金资助项目(2011ZX0302-004-02);“核高基”重大专项(2009ZX01039-001-002-004);科技部公共服务平台基金资助项目(9C26243314159);浙江省科技厅基金资助项目(2009C31107);宁波大学科研基金资助项目(B00241104900)

Optimization Algorithm for Garbage Collection Based on Embedded Java Virtual Machine

WU Zhi-jun   1, HE Jia-ming   1,2, ZENG Xing-bin   1, SHI Zhi-hui   3   

  1. (1. Research Institute of Communication Technology, Ningbo University, Ningbo 315211, China; 2. Key Laboratory of Mobile Internet Application Technology of Zhejiang Province, Ningbo 315211, China; 3. Ningbo SunRun Electronic Information Technology Development Limited Company, Ningbo 315211, China)
  • Received:2011-07-04 Online:2012-04-05 Published:2012-04-05

摘要: 对分代垃圾收集算法进行分析和改进,提出一种适用于嵌入式Java虚拟机的垃圾收集优化算法。采取动态的分代方式,将旧生代的回收工作细分,从而充分利用堆空间,缩短分代回收中全收集导致的停顿时间。实验结果表明,该算法能保持较高的垃圾收集效率,系统平均停顿时间较少。

关键词: Java虚拟机, 垃圾收集, 动态分代, 增量回收

Abstract: This paper analyzes and improves the generational garbage collection algorithm, proposes an optimization algorithm for Garbage Collection(GC) based on embedded Java Virtual Machine(JVM). It adopts dynamical generational approach, and divides the old generational recycle task into smaller segments. In this way, it can make full use of the heap and shorten the pause time which is caused by whole heap recycle. Experimental results show that the algorithm can shorten the average system pause time and bring high recycle efficiency.

Key words: Java Virtual Machine(JVM), Garbage Collection(GC), dynamic generation division, incremental collection

中图分类号: