如何测量java应用程序使用的内存?
我运行 JConsole。还有Eden空间、Heap内存使用情况等。 我认为使用的最小内存是Eden空间+Survivor+Code缓存。 因为其他内存只是暂时使用的。 它正确吗?谢谢。
I run JConsole. There are Eden space, Heap memory usage, etc.
I think that minimum memory used is Eden space + Survivor + Code cache.
Because other memory used only temporary.
Does it correct? Thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

如果您想要使用最小内存,请触发 GC 并查看此时使用的总内存。为了使应用程序高效运行,可能需要更多,但这是最少的。
If you want the minimum memory used, trigger a GC and see the total memory used at that point. For the application to run efficiently it may need to more, but this is the minimum.