在学习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 不能够相互匹配工作