Executable programs include BSS segments, data segments, and code segments

Source: Internet
Author: User
Executable programs include BSS segments, data segments, and code segments (also called text segments ). 1. bssbss (block started by symbol) is usually a memory area used to store uninitialized global variables and static variables in the program. Features: read/write, BSS segments are automatically cleared before the program is executed. Therefore, the uninitialized global variables are 0 before the program is executed. Note the difference from the data segment. BSS stores uninitialized global and static variables, and the data segment stores initialized global and static variables. In UNIX, you can use the SIZE command to view the segment size of the executable file. For example, size A. Out. 2. data segments are in a segmented memory management architecture. data segments are generally a memory area used to store initialized global variables in the program. The data segment belongs to the static memory allocation. Data segment, the code segment has been determined before the program runs. 3. Code segments in a segmented memory management architecture, code segments (code segment/Text Segment) are usually a memory area used to store code execution. The size of this area is determined before the program runs, and the memory area is usually read-only. Some architectures also allow code segments to be writable, that is, allow self-modified programs. In the code segment, it may also contain some read-only constant variables, such as string constants.

Executable programs include BSS segments, data segments, and code segments

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.