Stacks in the Java memory area

Source: Internet
Author: User

It is not accurate to say that the stack store is quoted.

 Public void Method1 () {    int i = 4;     int y = 2;     New Class1 ();}

Java Virtual machine stack is thread-private, his life cycle is the same as the thread, each method executes at the same time create a stack frame (stack frame), for storing local variable table , operand stack, dynamic link, method exit and other information. Each method from the call until the completion of the process, it corresponds to a stack frame in the virtual machine stack into the plank path out of the stack process.

A local variable table holds the various basic data types, object references (possibly handles or pointers) that the compiler can know. The space required for a local variable table is completed during compilation (64-bit long, double occupies 2 slots, other data types occupy only one), and the runtime does not change.

The above excerpt from the "in-depth understanding of Java virtual machines"

In addition, you can learn more about stack frames.

Stacks in the Java memory area

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.