Reputation: 1149
Based on the documentation : https://docs.oracle.com/javase/7/docs/api/java/lang/management/MemoryUsage.html
committed - represents the amount of memory (in bytes) that is guaranteed to be available for use by the Java virtual machine. The amount of committed memory may change over time (increase or decrease). The Java virtual machine may release memory to the system and committed could be less than init. committed will always be greater than or equal to used.
but the question is how JVM calculate the committed memory?
Upvotes: 6
Views: 6246
Reputation: 148
Here you can find a little bit more detail, but it does not explain the exact way how committed heap space is increased:
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
Upvotes: 1