本文已被:浏览 1695次 下载 3311次
Received:October 14, 2009 Revised:November 10, 2009
Received:October 14, 2009 Revised:November 10, 2009
中文摘要: 为了减少Java虚拟机垃圾收集器的开销,对Java栈帧进行改造使其支持对象的存储,在此基础上提出一种基于栈式内存分配的垃圾收集算法。算法首先在编译阶段通过对Java源代码进行分析确定栈式分配对象,并用扩展指令标识这些对象,程序运行时它们直接被分配到Java栈上,这些对象在程序离开其作用域时立即被释放,其它对象则分配到堆上,由垃圾收集器进行回收。实验结果表明,与传统基于堆式的垃圾收集算法相比,新算法内存分配和即时回收性能优,占用内存空间少,垃圾回收更及时,减轻了垃圾收集器的负担,提高了运行速度。
Abstract:In order to reduce the cost of java virtual machine garbage collector, we propose a stack-allocation based garbage collection algorithm. We improve the stack frame and make it support object storage, analyse and identify stack-allocation object when compiling the java source code, and mark the object with new byte command. Stack-allocation object will be allocated from java stack and released immediately when leaving its scope. Other object will be allocated from heap and released by garbage collector. Experimental results show that, compared with traditional garbage collector, the new algorithm improves the performance of allocating and releasing, reduces the burden of garbage collector and runs faster.
文章编号: 中图分类号: 文献标志码:
基金项目:国家重大专项(2009ZX01039-001-002-004);浙江省重大科技专项(2007C11070)
Author Name | Affiliation |
CHEN Xian-Chuang | 杭州电子科技大学 计算机应用技术 浙江 杭州 310018 |
XU Xiao-Liang |
Author Name | Affiliation |
CHEN Xian-Chuang | 杭州电子科技大学 计算机应用技术 浙江 杭州 310018 |
XU Xiao-Liang |
引用文本:
陈贤闯,徐小良.一种基于栈式分配的JVM垃圾收集算法①.计算机系统应用,2010,19(7):74-78
CHEN Xian-Chuang,XU Xiao-Liang.A Stack-Allocation Based JVM Garbage Collection Algorithm.COMPUTER SYSTEMS APPLICATIONS,2010,19(7):74-78
陈贤闯,徐小良.一种基于栈式分配的JVM垃圾收集算法①.计算机系统应用,2010,19(7):74-78
CHEN Xian-Chuang,XU Xiao-Liang.A Stack-Allocation Based JVM Garbage Collection Algorithm.COMPUTER SYSTEMS APPLICATIONS,2010,19(7):74-78