zoukankan      html  css  js  c++  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 specification. I draw a diagram which helps me understand.

    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 kinds of constants, ranging from numeric literals known at compile-time to method and field references that must be resolved at run-time.

    JVM Stack

    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

  • 相关阅读:
    6.1 tar:打包备份
    6.3-4 zip、unzip
    6.5 scp:远程文件复制
    S7 Linux用户管理及用户信息查询命令
    7.6 passwd:修改用户密码
    7.2-5 usermod
    DES
    FreeRTOS笔记
    第4章 裸机系统和多任务系统
    第008课_第1个ARM落版程序及引申
  • 原文地址:https://www.cnblogs.com/davidwang456/p/3528820.html
Copyright © 2011-2022 走看看