In-depth analysis of Java Web Technology Insider Learning Notes

Source: Internet
Author: User

In-depth analysis of Java Web Technology Insider Learning Notes
In the Java Virtual Machine specification, the Java Runtime data is divided into 6 types, where the domain is a member of the class, respectively:
PC Register data: It is used to save the memory address of the currently executing program, the JVM specification defines only the Java method required to record pointer information, and for the native method, there is no need to record the execution of the pointer address. The PC register points to the current active stack (the top of the stack, the currently executing method) address
Java stack:closely related to threads, each method of invocation in a thread has a corresponding stack in the stack, which mainly holds some basic types of variable data (int, short, long, byte, float, double, Boolean, char) and object handle (reference) , these variables are local variables and are the root node objects of the GC.
Heap:A non-static property that holds the Java copy object of the class file and inherits from the parent class. The heap is shared by all threads and requires attention to synchronization.

Method Areais part of the heap, which is the permanent zone. Used to store class structure information, in which constant pools, fields, method data, method bodies, constructors, including specialized methods in classes, instance initialization, interface initialization, are stored in this region

To run a constant-rate pool:Is the constant pool in the method area, which is part of the method area.  Contains the following constants: numeric constants at compile time, methods, or references to domains (resolved at run time). GC root node.

Local Method StackThe local method stack is the space prepared for the JVM to run the native method, similar to the stack, where some Java methods are recompiled to native code codes when the JVM takes advantage of JIT, and these compiled native code often uses this stack to track the execution state of the method. Some class objects are referenced by the native method and cannot be recycled by GC.
Doubts:1. Where is the member method of the object stored when you create a new object?     Method Area? Guess: Method body existence Method area, in the execution of the method, according to the specific object to the stack to find the corresponding method to call in the stack, the execution of the stack popup return value. 2. Where is the local method stack? Is there another stack space that is separate from the stack in memory? 3. What is the class object stored in the heap (either the method area or the non-method area, or the split is stored in the method area)?
Stack: Static memory allocation heap: Dynamic memory allocation

How does the Yong old Perman three area of heap memory correspond to the previous classes?




From for notes (Wiz)

In-depth analysis of Java Web Technology Insider Learning Notes

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.