Java application memory size

后端 未结 2 527
轮回少年
轮回少年 2021-01-06 15:52

While either IntelliJ or Eclipse are running, I can see how much heap they are using from inside the application from the progress bar at the bottom.. it always indicates a

2条回答
  •  走了就别回头了
    2021-01-06 16:31

    JVM memory usage can be explained by this image:

    JVM Memory Usage

    As you can see, it's not just -Xmx. Total process memory would also include the -XX:PermSize, stack size of all the threads, JVM memory used by the JIT and other internals. Don't forget about the memory mapped files which are also included in the process memory. IntelliJ IDEA uses memory mapped files for caches, so it can add several hundreds megabytes.

    If you need the details, use some profiler like JConsole or YourKit.

提交回复
热议问题