ParNew 和 Parallel Old

来源:互联网 发布:浅谈移动通信网络优化 编辑:程序博客网 时间:2024/05/22 21:20


在学习java垃圾收集器的时候,遇到一个困惑,看下图,为什么没有新生代选择ParNew,老年代使用Parallel Old的选择?

这里写图片描述


最后在Our Collectors博客找到答案

ParNew is written in a style where each generation being collected offers certain interfaces for its collection.

For example, ParNew (and Serial) implements space_iterate() which will apply an operation to every object in the young generation. Alternatively, Parallel Scavenge (at least with its initial implementation before Parallel Old) always knew how the tenured generation was being collected and could call directly into the code in the Serial Old” collector.

Parallel Old is not written in the ParNew style so matching it with ParNew doesn’t just happen without significant work. By the way, we would like to match Parallel Scavenge only with Parallel Old eventually and clean up any of the ad hoc code needed for “Parallel Scavenge” to work with both.

主要是说:Parallel Old 和 ParNew 不能够相互匹配工作

1 0