This preview shows page 1. Sign up to view the full content.
Unformatted text preview: APTER 10. VIRTUAL MEMORY different for each process identical for each process kernel virtual memory 0x40000000 brk Memory mapped region for shared libraries process virtual memory
runtime heap (via malloc) uninitialized data (.bss) initialized data (.data) program text (.text) forbidden 0x08048000 0 Figure 10.28: The virtual memory of a Linux process. segment, data segment, heap, shared library segment, and user stack are all distinct areas. Each existing virtual page is contained in some area, and any virtual page that is not part of some area does not exist, and cannot be referenced by the process. The notion of an area is important because it allows the virtual address space to have gaps. The kernel does not keep track of virtual pages that do not exist, and such pages do not consume any additional resources in memory, on disk, or in the kernel itself. Figure 10.29 highlights the kernel data structures that keep track of the virtual memory areas in a process. The kernel maintains a distinct task structure...
View Full Document