Java虚拟机中无用单元的精确回收  被引量:2

IMPLEMENTATION OF THE PRECISE GARBAGE COLLECTION FOR JAVA VIRTUAL MACHINE

在线阅读下载全文

作  者:丁宇新[1] 程虎[1] 

机构地区:[1]中国科学院软件研究所,北京100080

出  处:《计算机学报》1999年第11期1228-1232,共5页Chinese Journal of Computers

摘  要:保守无用单元回收算法由于没有考虑内存单元的类型信息而导致大量的无用单元无法回收,该文结合Java 虚拟机的特点提出了对象空间的优化存储结构、内存单元数据类型的标记算法.优化存储结构将对象引用域与基本域分开存放,加快了垃圾回收程序扫描对象空间的速率.内存单元数据类型的标记算法采用静态变量标记与动态变量跟踪的方法,较好地解决了变量数据类型的控制点依赖与控制路径依赖,为无用单元的精确回收奠定了基础,该文并就增量回收算法的设计进行了简单的讨论. 最后作者用实验验证了该方法的可行性,实验表明动态内存标记并没有引入过多的时间耗费且回收空间显著增加.Ambiguous roots garbage collectors (commonly called “conservative”) can be overly conservative because they overestimate the root set and thereby retain unexpectedly large amounts of garbage. In this paper considering the properties of Java virtual machine, a new memory structure for objects and a new algorithm to tag the variables' types are presented. In each object space the object reference fields and the primitive fields are stored separately, this structure can speed garbage collector to scan the objects' space to find non usable objects. The new algorithm is used to tag the variables' types in the running time to obtain a type precise root set for garbage collector. In it statically marking and dynamically tracing variables are used to decide the variables' data type. This algorithm is simple and practical, it solves the problem of control path dependency and control point dependency of variables' data type. Based on it a precise incremental garbage collection algorithm is implemented. The experimental results prove that the time cost of the type analyses is acceptable and the reclaimed space increased prominently compared with traditional conservative garbage collection algorithm.

关 键 词:无用单元回收 虚拟机 JAVA语言 程序设计 

分 类 号:TP311[自动化与计算机技术—计算机软件与理论]

 

参考文献:

正在载入数据...

 

二级参考文献:

正在载入数据...

 

耦合文献:

正在载入数据...

 

引证文献:

正在载入数据...

 

二级引证文献:

正在载入数据...

 

同被引文献:

正在载入数据...

 

相关期刊文献:

正在载入数据...

相关的主题
相关的作者对象
相关的机构对象