Mark&Sweep algorithm 标记和清除算法
The tenured collectors all use a mark-sweep-compact algorithm.
老年区收集器都使用了标记扫 描压缩(mark-sweep-compact)算法。
The problem with a mark-sweep algorithm is that it can lead to fragmentation (Figure 2).
“标记-清扫” 算法的问题是可能会导致碎片(fragmentation),如图 2 所示。
The copying algorithm has excellent performance characteristics, but it has the drawback of requiring twice as much memory as a mark-sweep collector.
复制算法的性能很优异,但是它有一个缺点是需要两倍于标记-清除收集器所需要的内存。
应用推荐