Linux virtual address space of a process description

The concept of virtual memory, the operating system provides exactly the same view of memory for each process, the memory address space of view, called the virtual address space.

From the point of view of each process, memory, there is only the operating system kernel and the present process, i.e. the memory is exclusively present process.

Linux process virtual address space

From the point of view yearning, into the process code and data area, the heap data area, shared reservoir area, stack area, the kernel memory area.

Process code and data area

The contents of executable program files loaded into the region, which is divided into two parts, the lower part of the address codes comprising the program and data read-only, read-only portion; another storage area for reading and writing data may be an executable file to be
reading and writing area.

This region is not starting from address 0, which has an offset address.

Heap data area

I.e. heap region heap data area, in the C program, allocation and deallocation of the region mallocand freecarry out. As the regional distribution of the region extending continuously from the lower to higher addresses direction.

Share Reservoir

I.e., shared library memory map region, in the C word order, and the like where the object code library printf function is loaded into the region.

The start address of the region is fixed, and extends the high address.

Stack area

Stack zone, operating procedures, function calls generated by the stack located in the region.

The start address of the fixed area (next to the kernel memory area), with generation function is called the stack, in the region extending continuously from the high address to the lower addresses.

Kernel memory area.

Kernel virtual memory area in the virtual address space of an address space at the highest address. The process can not access the user area.

Guess you like

Origin www.cnblogs.com/haiiiiiyun/p/12532759.html