We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c8bb5cb commit e8a5141Copy full SHA for e8a5141
docs/java/搞定JVM垃圾回收就是这么简单.md
@@ -66,9 +66,10 @@ Java 堆是垃圾收集器管理的主要区域,因此也被称作**GC 堆(G
66
**堆空间的基本结构:**
67
68
<div align="center">
69
-<img src="https://my-blog-to-use.oss-cn-beijing.aliyuncs.com/2019-3 堆结构.png" width="400px"/>
+<img src="https://my-blog-to-use.oss-cn-beijing.aliyuncs.com/2019-3堆结构.png" width="400px"/>
70
</div>
71
72
+
73
上图所示的 eden 区、s0 区、s1 区都属于新生代,tentired 区属于老年代。大部分情况,对象都会首先在 Eden 区域分配,在一次新生代垃圾回收后,如果对象还存活,则会进入 s0 或者 s1,并且对象的年龄还会加 1(Eden 区->Survivor 区后对象的初始年龄变为 1),当它的年龄增加到一定程度(默认为 15 岁),就会被晋升到老年代中。对象晋升到老年代的年龄阈值,可以通过参数 `-XX:MaxTenuringThreshold` 来设置。
74
75

0 commit comments