【发布时间】:2021-11-19 08:25:51
【问题描述】:
并发标记扫描垃圾收集器的日志条目包含 Java-8 上的信息,例如(为便于阅读而插入的修剪和换行符):
{Heap before GC invocations=3 (full 0):
...
concurrent mark-sweep generation total 29612480K, used 994856K ...
2021-10-25T02:40:58.947+0200: 27.293: [GC (Allocation Failure) 2021-10-25T02:40:58.947+0200: 27.293:
[ParNew: 996800K->110720K(996800K), 1.6650446 secs]
1991656K->1859618K(30609280K), 1.6651368 secs] ...
Heap after GC invocations=4 (full 0):
...
concurrent mark-sweep generation total 29612480K, used 1748898K ...
}
问题:mark-sweep generation ..., used 1748898K 与 ->110720K 为 ParNew 和 ->1859618K 给出的集合后的结果大小有何关系。从措辞中,我预计这两个->-values 的总和应该是used 值。 used 值是什么意思?
【问题讨论】: