Java Run data region

Source: Internet
Author: User

dependent on the start and end of the user thread to build and destroy (thread private):

    • Program Counter Register is a small memory space that acts as a line number indicator of the bytecode that is being executed by the current thread.
    • --The virtual machine stack describes the memory model that is executed by the Java method: Each time a method is executed, a stack frame (stack Frame①) is created to store the local variable table, Operation Stack, dynamic link, method exit and other information. Each method is called until the completion of the process, corresponding to a stack frame in the virtual machine stack from the stack to the process of the stack.

The local variable table holds the basic data data type known by the compiler (Boolean,byte,char int long double short float) and the object reference

    • The role of the local method stack (Native methods Stacks) is very similar to the virtual machine stack, but the difference is that the virtual machine stack executes Java methods (that is, bytecode) services for the virtual machine. The local method stack is the native method service used by the virtual machine (some VMS, such as Sun HotSpot, directly combine the local method stack and the virtual machine stack)


exists as the virtual machine process starts (thread sharing)

    • The Java heap is a piece of memory that is shared by all threads and created when the virtual machine is started. The only purpose of this area of memory is to hold object instances where almost all of the object instances are allocated memory. This is described in the Java Virtual Machine specification: All object instances and arrays are allocated on the heap. (from a memory recovery perspective, the Java heap can be subdivided into the new generation and the old era, since the collector is basically a generational collection algorithm)
    • The method area, like the Java heap, is an area of memory shared by each thread that stores data such as class information, constants, static variables, and code compiled by the immediate compiler that have been loaded by the virtual machine. (Relatively speaking, garbage collection behavior is relatively rare in this area, and recovery targets are primarily for the recovery of constant pools and unloading of classes)
    • The runtime Constant pool is part of the method area that holds the various literal and symbolic references generated by the compiler, and his other important feature relative to the class file constant pool is its dynamic nature. This feature is used by developers more than the Intern method of the String class (in http://www.cnblogs.com/luluQQ/p/5153979.html, there is a detailed explanation of the string intern method)

Java Run data region

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.