Java内存的Used、Committed、Max的区别

不想看英文,可直接看最后的结论。

A MemoryUsage object represents a snapshot of memory usage. Instances of the MemoryUsage class are usually constructed by methods that are used to obtain memory usage information about individual memory pool of the Java virtual machine or the heap or non-heap memory of the Java virtual machine as a whole.
A MemoryUsage object contains four values:

init: represents the initial amount of memory (in bytes) that the Java virtual machine requests from the operating system for memory management during startup. The Java virtual machine may request additional memory from the operating system and may also release memory to the system over time. The value of init may be undefined.
used: represents the amount of memory currently used (in bytes).
committed: represents the amount of memory (in bytes) that is guaranteed to be available for use by the Java virtual machine

你可能感兴趣的:(Java语言积累,java,编程语言)