1,Body section. This is the machine instruction part executed by c p u. Generally, body segments can be shared, so even the executed programs (such as text editors, C compilers, and s h e l) only need one copy in the memory, in addition, the body segment is often read-only to prevent the program from modifying its own instructions due to accidents.
2. initialize the data segment.This section is usually called a data segment, which contains the variables in the program that need to be assigned an initial value. For example, in the C program, description other than any function: int maxcount = 99; stores this variable in the initialization data segment as an initial value. Is it a global static variable?
3. Non-initialized data segments.This section is generally referred to as the B S segment, which is derived from an operator of the early assembler, meaning "block started by symbol (Block starting with the symbol )", before the program starts to run, the kernel initializes this segment to 0. Description outside the function: Long sum [1000]; stores this variable in non-initialized data segments.
4. Stack. The automatic variables and the information to be saved for each function call are stored in this section. Each time a function is called, its return address and caller's environmental information (such as some machine registers) are stored in the stack. Then, the newly called function automatically allocates storage space for it and temporary variables on the stack. By using the stack in this way, the C function can be called recursively.
5.It is usually used for dynamic storage allocation in the heap. Due to historical practices, the heap is located between the top of the non-initialized Data Segment and the bottom of the stack.