The structure of an executable program

Source: Internet
Author: User

The structure of the executable program;

1. First, we know that programming is the logic of writing data and processing data.

2. After an application is compiled, the executable file is divided into: Code area, constant area double-click the program, the host system will have an application loader software. The program loads the application into memory. When the memory is loaded, the global variables, constants, and other data in the program begin to load.

3. Memory divided into: Code area (segment), constant area (segment), BSS segment, heap area, stack area

4. The code area stores the code corresponding to the machine instructions

5. The constant area stores all the constants in the program

6.BSS segment, used to store the value of a global variable

7. Storage of dynamic memory managed by the user in the heap, this memory is completely managed by the user

8. The stack area is the memory that is maintained by the operating system, and each function will request a certain amount of memory to the operating system before it is run, and then the function can be executed, and the memory freed.

Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.

The structure of an executable program

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.