gpt4 book ai didi

java - Runtime.totalMemory() 从 64 位 jvm 中配置的 -Xmx 值给我一个错误的值

转载 作者:行者123 更新时间:2023-11-29 03:38:31 29 4
gpt4 key购买 nike

配置的 -Xmx 为 2037m (-Xmx2037),当从
获取总内存时Runtime.totalMemory() 它给出了 136mb,我怎样才能得到精确配置的 xmx 值?

最佳答案

使用Runtime.maxMemoryRuntime.totalMemory返回当前堆大小。

关于java - Runtime.totalMemory() 从 64 位 jvm 中配置的 -Xmx 值给我一个错误的值,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14234158/

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