What is the difference between Java Non Heap Memory and Stack Memory? Are they Same if not what is the difference between them?

前端 未结 3 915
被撕碎了的回忆
被撕碎了的回忆 2020-12-25 14:41

I am using Jconsole for monitoring a Java Application. The memory tab shows different Heap and Non Heap memories like

  1. Heap Memory Usage
  2. Non Heap Memor
3条回答
  •  执念已碎
    2020-12-25 15:30

    Please follow the links http://www.yourkit.com/docs/kb/sizes.jsp and http://publib.boulder.ibm.com/infocenter/javasdk/v5r0/index.jsp?topic=%2Fcom.ibm.java.doc.diagnostics.50%2Fdiag%2Fproblem_determination%2Faix_mem_heaps.html

    Non-Heap Also, the JVM has memory other than the heap, referred to as non-heap memory. It is created at the JVM startup and stores per-class structures such as runtime constant pool, field and method data, and the code for methods and constructors, as well as interned Strings.

    Unfortunately, the only information JVM provides on non-heap memory is its overall size. No detailed information on non-heap memory content is available.

    The abnormal growth of non-heap memory size may indicate a potential problem, in this case you may check up the following:

    If there are class loading issues such as leaked loaders. In this case, the problem may be solved with the help of Class loaders view. If there are strings being massively interned. For detection of such problem, Object allocation recording may be used.

提交回复
热议问题