Missing memory: size of young generation includes only one survivor space(内存缺失:年轻代的大小只包含一个幸存者空间)
问题描述
在 Java 堆上,我预计年轻一代的大小将是eden空间和两个幸存者空间(从空间和到空间):
On the Java heap, I expected that the size of the young generation would be the sum of the sizes of the eden space and both of the survivor spaces (from space and to space):
[young gen size] = [eden space size] + [from space size] + [to space size]
但是,GC 日志(使用 XX:+PrintHeapAtGC)表明 young generation 的大小是 eden 空间大小的总和 并且只有幸存者空间之一:
However, GC logs (using XX:+PrintHeapAtGC) state that the size of the young generation is the sum of the sizes of the eden space and only one of the survivor spaces:
[young gen size] = [eden space size] + [from space size]
为什么年轻代的大小只包括一个幸存者空间的大小?
可能是因为只有一个幸存者空间可用?但是两个幸存者空间都存在,所以两个幸存者空间都应该为新一代的规模做出贡献?
Maybe because only one of the survivor spaces is available at any time? But both survivor spaces exist so both survivor spaces should contribute to the size of the new generation?
GC 日志:
{Heap before GC invocations=48 (full 17):
par new generation total 943744K, used 891496K [0x000000073ae00000, 0x000000077ae00000, 0x000000077ae00000)
eden space 838912K, 100% used [0x000000073ae00000, 0x000000076e140000, 0x000000076e140000)
from space 104832K, 50% used [0x000000076e140000, 0x000000077149a040, 0x00000007747a0000)
to space 104832K, 0% used [0x00000007747a0000, 0x00000007747a0000, 0x000000077ae00000)
来自:
[young gen size] = [eden space size] + [from space size]
943744K = 838912K + 104832K
推荐答案
在任何时候,幸存者空间之一总是为空,因此不能被视为可用.
At any time one of the survivor spaces is always empty, so it cannot be considered available.
这篇关于内存缺失:年轻代的大小只包含一个幸存者空间的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:内存缺失:年轻代的大小只包含一个幸存者空间
基础教程推荐
- REST Web 服务返回 415 - 不支持的媒体类型 2022-01-01
- 问题http://apache.org/xml/features/xinclude测试日志4j 2 2022-01-01
- 如何对 Java Hashmap 中的值求和 2022-01-01
- RabbitMQ:消息保持“未确认"; 2022-01-01
- 修改 void 函数的输入参数,然后读取 2022-01-01
- Spring AOP错误无法懒惰地为此建议构建thisJoinPoin 2022-09-13
- Struts2 URL 无法访问 2022-01-01
- 无法复制:“比较方法违反了它的一般约定!" 2022-01-01
- 使用堆栈算法进行括号/括号匹配 2022-01-01
- 存储 20 位数字的数据类型 2022-01-01
