Virtual memory structure for a process can be described as in this diagram:
While this is part of the address space, it cannot be addressed directly by the process. It must be addressed via system calls. |
Used by the program for variables and storage. It grows and shrinks in size depending on what routines are called and what their stack space requirements are. It is normally about 8MB in size. |
libc.so .
|
This is the address space that is unallocated and unused. It does not tie up physical memory. For most processes, this is the largest portion of the virtual memory for the process. |
Used for some types of working storage. It is allocated by the malloc function.
|
Uninitialized variables. These are not part of the executable file and their initial value is set to zeros. |
Global variables, constants, static variables from the program. |
Set of instructions from the compiler-generated executable file. |
The virtual memory map for a process can be displayed using the
pmap
command.
Additional information is available on the Processes page.
No comments:
Post a Comment