http://www.programcreek.com/2013/04/jvm-run-time-data-areas/
This is my note of reading JVM specification. I draw a diagram which helps me understand.
1. Data Areas for Each Individual Thread (not shared)
Data Areas for each individual thread include program counter register,JVM Stack,and Native Method Stack. They are all created when a new thread is created.
Program Counter Register: it is used to control each execution of each thread. JVM Stack: It contains frames which is demonstrated in the diagram below.
Native Method Stack: it is used to support native methods,i.e.,non-Java language methods.
2. Data Areas Shared by All Threads
All threads share Heap and Method Area.
Heap: it is the area that we most frequently deal with. It stores arrays and objects,created when JVM starts up. Garbage Collection works in this area.
Method Area: it stores run-time constant pool,field and method data,and methods and constructors code。
Runtime Constant Pool: It is a per-class or per-interface run-time representation of the constant_pool table in a class file. It contains several kinds of constants,ranging from numeric literals kNown at compile-time to method and field references that must be resolved at run-time.
Stack contains Frames,and a frame is pushed to the stack when a method is invoked. A frame contains local variable array,Operand Stack,Reference to Constant Pool.
For more @R_958_4045@ion,please go to the offical JVM specification site.
References: 1. 2.
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 [email protected] 举报,一经查实,本站将立刻删除。