gpt4 book ai didi

java - JVM是怎么计算committed堆内存的?

转载 作者:搜寻专家 更新时间:2023-10-31 20:31:42 24 4
gpt4 key购买 nike

基于文档:https://docs.oracle.com/javase/7/docs/api/java/lang/management/MemoryUsage.html

committed - 表示保证可供 Java 虚拟机使用的内存量(以字节为单位)。提交的内存量可能会随时间变化(增加或减少)。 Java 虚拟机可能会向系统释放内存,并且提交的内存可能少于 init。 committed 将始终大于或等于 used。

但问题是 JVM 如何计算已提交的内存?

最佳答案

在这里你可以找到更多的细节,但它没有解释如何增加提交堆空间的确切方式:

There is also a committed heap size which acts as a "high water mark", moving up once the JVM cannot free up space even on old collection / young collection to make room. In this case, the committed heap size is increased. This cycle repeats until the committed heap size matches the maximum heap size, the maximum space allocatable.

https://support.mulesoft.com/s/article/Java-JVM-memory-allocation-pattern-explained

关于java - JVM是怎么计算committed堆内存的?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53296481/

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