I'm now learning JVM knowledge and there are some confusion. For Example, I know that
Runtime data area in JVM can be divided as below,
1) Method Area : Storage area for compiled class files.(One per JVM instance)
2) Heap : Storage area for Objects.(One per JVM instance)
3) Java stack: Storage are for local variables, results of intermediate operations.(One per thread)
4) PC Register : Stores the address of the next instruction to be executed if the next instruction is native method then the value in pc register will be undefined.(One per thread)
5) Native method stacks : Helps in executing native methods( methods written in languages other than java).(One per thread)
But I can not map it to a real java code. And I think there must be a small tool like JConsole or VisualVM that can monitor a JVM thread and show me every memory area stores which part of a java class. I think it will greatly help me to understand the JVM memory allocation.
The reason of I ask this question is that lots of people tell others that which code will stored in which area, "Do not tell me ,just show me". Or is there something can be proved by run result.