File tree Expand file tree Collapse file tree 1 file changed +1
-1
lines changed Expand file tree Collapse file tree 1 file changed +1
-1
lines changed Original file line number Diff line number Diff line change 54
54
55
55
当在 ` Eden ` 区分配内存不足时,则会发生 ` minorGC ` ,由于 ` Java ` 对象多数是** 朝生夕灭** 的特性,所以 ` minorGC ` 通常会比较频繁,效率也比较高。
56
56
57
- 当发生 ` minorGC ` 时,JVM 会根据[ 复制算法] ( https://github.com/crossoverJie/Java-Interview/blob/145064ecf867e898ad025f3467b7ada9086fc8dd /MD/GarbageCollection.md#%E5%9E%83 %E5%9C%BE%E5%9B%9E%E6%94 %B6%E7%AE%97%E6%B3%95 ) 将存活的对象拷贝到另一个未使用的 ` Survivor ` 区,如果 ` Survivor ` 区内存不足时,则会使用分配担保策略将对象移动到老年代中。
57
+ 当发生 ` minorGC ` 时,JVM 会根据[ 复制算法] ( https://github.com/crossoverJie/Java-Interview/blob/master /MD/GarbageCollection.md#%E5%A4%8D %E5%88 %B6%E7%AE%97%E6%B3%95 ) 将存活的对象拷贝到另一个未使用的 ` Survivor ` 区,如果 ` Survivor ` 区内存不足时,则会使用分配担保策略将对象移动到老年代中。
58
58
59
59
谈到 ` minorGC ` 时,就不得不提到 ` fullGC(majorGC) ` ,这是指发生在老年代的 ` GC ` ,不论是效率还是速度都比 ` minorGC ` 慢的多,回收时还会发生 ` stop the world ` 使程序发生停顿,所以应当尽量避免发生 ` fullGC ` 。
60
60
You can’t perform that action at this time.
0 commit comments