gpt4 book ai didi

java - 为什么 JVM HeapMemoryUsage init 值大于 commited/max 值?

转载 作者:行者123 更新时间:2023-12-02 08:57:37 24 4
gpt4 key购买 nike

我有一个具有以下选项的应用程序:

-xms2g -xmx2g

我发现 init 值大于 maxcommited 值。看来 init 值包含元空间大小。我搜索了 javadoc,但没有找到答案。您能给我相关的代码/javadoc 引用吗?

提前致谢。

VisualVM screenshot

最佳答案

getHeapMemoryUsage将 init 描述为设置/定义值而不是实际总和:

The used and committed size of the returned memory usage is the sum of those values of all heap memory pools whereas the init and max size of the returned memory usage represents the setting of the heap memory which may not be the sum of those of all heap memory pools.

您的设置为 2g,等于您的初始显示 2147483648

关于java - 为什么 JVM HeapMemoryUsage init 值大于 commited/max 值?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59064137/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com