A fundamental 'rule' of virtual memory is this: all potentially addressable memory is in a box; that is, it's sandboxed. We think of this 'box' as the process image or the process VAS. Looking outside the box is disallowed.
Here, we provide only a quick overview of the process user VAS. For details, please refer to the Further reading section at the end of this chapter.
The user VAS is divided into homogeneous memory regions called segments or, more technically, mappings. Every Linux process has at least these mappings (or segments):
Figure 6.2 – Process VAS
Let's go over a quick breakdown of these segments or mappings:
- Text segment: This is where the machine code is stored; static (mode: r-x).
- Data segment(s): This is where the global and static data variables are stored (mode: rw-). It is internally divided into three distinct segments:
- Initialized data segment...