`

Java垃圾回收——设置内存大小

    博客分类:
  • JVM
阅读更多

 At initialization of the virtual machine, the entire space for the heap is reserved. The size of the space reserved can be specified with the -Xmx option.
If the value of the -Xms parameter is smaller than the value of the -Xmx parameter, not all of the space that is reserved is immediately committed to the virtual machine.
The uncommitted space is labeled "virtual" in this figure. The different parts of the heap (permanent generation, tenured generation, and young generation) can grow to the limit of the virtual space as needed.

其中内部各部分的大小也可以设置。

一般建议固定大小,不要让虚拟机在调整大小上浪费性能。

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics