最后,还有混合型的收集器,如1.2和以后版本的JDK使用的分代收集器,它对堆的不同区域使用不同的收集算法。
Finally, there are hybrid collectors, such as the generational collector employed by the 1.2 and later JDKs, which use different collection algorithms on different areas of the heap.
分代垃圾收集器把堆分成多代;多数JVM使用两代,“年轻代”和“年老代”。
A generational garbage collector divides the heap into multiple generations; most JVMs use two generations, a "young" and an "old" generation.
其他性能改进方法包括提高堆大小、调整保育室(nursery)大小(用于分代收集器)和尝试另一个GC策略。
Performance can also be improved by increasing the heap size, playing with the nursery size (for generational collectors), and trying a different GC policy.
应用推荐