JVM Run-Time Data Areas.
class SimpleThread extends Thread {
public SimpleThread(String name) {
super(name);
}
public void run() {
for(int i = 0; i < 50; i++) //every 'i' variable corresponds to an individual thread,that is,each thread contains its own 'i' variable.
println("thread name = \"" + Thread.currentThread().getName() + "\",id=" + getId() +" run = " + i);
}
}

JVM-runtime-data-area
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 kind-s 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 information, please go to the offical JVM specification site.
References:
1. JVM Specification – Run-Time Data Areas
2. Java Bytecode Fundamentals
JVM Run-Time Data Areas.的更多相关文章
- Java Run-Time Data Areas
前言 本文主要介绍JVM的运行时数据区 来自Oracle文档 Java Virtual Machine Specification -- Chapter 2. The Structure of the ...
- Java-JVM 运行时内存结构(Run-Time Data Areas)
Java 虚拟机定义了在程序执行期间使用的各种运行时数据区域. 其中一些数据区域所有线程共享,在 Java 虚拟机(JVM)启动时创建,仅在 Java 虚拟机退出时销毁. 还有一些数据区域是每个线程的 ...
- JVM Run-Time Data Areas--reference
http://www.programcreek.com/2013/04/jvm-run-time-data-areas/ This is my note of reading JVM specific ...
- 深入理解JVM内幕(转)
转自:http://blog.csdn.net/zhoudaxia/article/details/26454421/ 每个Java开发者都知道Java字节码是执行在JRE((Java Runtime ...
- 深入理解JVM内幕:从基本结构到Java 7新特性
转自:http://www.importnew.com/1486.html 每个Java开发者都知道Java字节码是执行在JRE((Java Runtime Environment Java运行时环境 ...
- JVM 内部原理(二)— 基本概念之字节码
JVM 内部原理(二)- 基本概念之字节码 介绍 版本:Java SE 7 每位使用 Java 的程序员都知道 Java 字节码在 Java 运行时(JRE - Java Runtime Enviro ...
- JVM 内部原理(一)— 概述
JVM 内部原理(一)- 概述 介绍 版本:Java SE 7 图中显示组件将会从两个方面分别解释.第一部分涵盖线程独有的组件,第二部分涵盖独立于线程的组件(即线程共享组件). 目录 线程独享(Thr ...
- Understanding JVM Internals---不得不转载呀
http://www.cubrid.org/blog/dev-platform/understanding-jvm-internals/ http://architects.dzone.com/art ...
- JVM Guide
Java Virtual Machine: the Essential Guide October 8th, 2014 - By Alexey Zhebel Introduction Java Vir ...
随机推荐
- 【BZOJ1036】 树的统计Count (树链剖分)
Description 一棵树上有n个节点,编号分别为1到n,每个节点都有一个权值w.我们将以下面的形式来要求你对这棵树完成一些操作: I. CHANGE u t : 把结点u的权值改为t II. Q ...
- Delphi消息的广播方式(先RegisterWindowMessage,后SendMessage HWND_BROADCAST,最后改写接收窗口的WndProc)
///////消息广播只能将消息传递到接收消息的主程序中,MDIChild窗体不能接收到广播消息:///////// unit Unit1; interface uses Windows, Messa ...
- lc面试准备:Remove Duplicates from Sorted List II
1 题目 Given a sorted linked list, delete all nodes that have duplicate numbers, leaving only distinct ...
- MyEclipse Spring被删之后,如何在myeclipse里面重新导入
1.找到项目文件 2.用记事本打开 .project 把里面涉及到spring的全部删除就可以了.
- poj -2975 Nim
Nim Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 4312 Accepted: 1998 Description ...
- Linux学习笔记8——VIM编辑器的使用
在ubuntu中,敲入命令行:sudo apt-get install vim,然后输入系统密码,确认Y,即可下载vim 按下vim,在后面跟上文件的路径,即可进入文件到编辑模式,如果不存在该文件,将 ...
- apache php gzip压缩输出的实现方法
一.gzip介绍 gzip是GNU zip的缩写,它是一个GNU自由软件的文件压缩程序,也经常用来表示gzip这种文件格式.软件的作者是Jean-loup Gailly和Mark Adler.1992 ...
- css背景图片位置:background的position
position的两个参数:水平方向的位置,垂直方向的位置----------该位置是指背景图片相对于前景对象的 1.background:url(../image/header.jpg) no-re ...
- 中科院NLPIR中文分词java版
中科院NLPIR中文分词java版 中科院NLPIR中文分词java版
- windows 下文件上传到fastdfs
php.ini 配置 [fastdfs]; the base pathfastdfs_client.base_path = D:/tmp ; connect timeout in seconds; d ...