分代收集证明是非常高效的,尽管在运行时它需要更多的簿记。
Generational garbage collection turns out to be very effective, although it introduces several additional bookkeeping requirements at runtime.
分代收集的一个优点是它不同时收集所有的代,因此可以使垃圾收集暂停更短。
One of the advantages of generational collection is that it can make garbage collection pauses shorter by not collecting all generations at once.
分代收集器对不同的代可以自由使用不同的收集策略,对各代分别进行垃圾收集。
A generational collector is free to use a different collection strategy for different generations and perform garbage collection on the generations separately.
分代收集器(generializational collector)将堆分为多个代。
A generational collector divides the heap into multiple generations.
其他性能改进方法包括提高堆大小、调整保育室(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.
最后,还有混合型的收集器,如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.
为了解决这个问题,分代收集器必须显式地跟踪从老对象到年轻对象的引用并将这些老到年轻的引用加入到小的收集的根集中。
To address this problem, generational collectors must explicitly track references from older objects to younger objects and add these old-to-young references into the root set of the minor collection.
为了解决这个问题,分代收集器必须显式地跟踪从老对象到年轻对象的引用并将这些老到年轻的引用加入到小的收集的根集中。
To address this problem, generational collectors must explicitly track references from older objects to younger objects and add these old-to-young references into the root set of the minor collection.
应用推荐