Java program execution memory processing process

Source: Internet
Author: User

Java program execution memory processing process

We need to know not only what we learn, but also why. Your salary must be in direct proportion to your learning depth.

In the past, we learned how to develop a program and have some development experience. But how does a program run in the memory?

1. First, let's look at a picture.

<喎?http: www.bkjia.com kf ware vc " target="_blank" class="keylink"> VcD4KPHA + expires/ydLUutzH5bP + expires + 78tXf19a3 + expires + CnW0MHLoaMKPHA + CiA8L3A + CjxwPgozoaK + expires/expires = "brush: java; "> public static void main (String args []) {Point p = new Point (1, 2, 3);} class Point {int x, y, z; point (int _ x, int _ y, int _ z) x = _ x; y = _ y; z = _ z ;}

The running process of this program is as follows:

  1. Load the program from the hard disk to the memory area
  2. Locate the main method and start execution.
  3. Memory Management During Program Execution

    The local variable p appears in the stack memory;

    The data zone appears in the heap memory;

    The p pointer in the stack points to the corresponding data zone in the heap ..



Related Article

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.