LOGBOOK

HELP

Quiz Entry - updated: 2026.07.07

What is virtual memory and what does a process's address space look like?

Virtual memory gives each process its own private, seemingly contiguous address space, with the MMU translating those addresses to real RAM.

A process virtual address space as a vertical stack from high address at top to low at bottom: kernel space (invisible to the user), the stack growing down, the memory-mapped region for shared libraries, the heap growing up via malloc, read/write data, and read-only code (.text) near 0x400000. Each process gets its own private space isolated by the MMU.

* A Linux process sees its own private virtual address space, laid out from a stack that grows down toward a heap that grows up, isolated by the MMU. *

Linux process address space (low to high):

+------------------------+ High addresses
| Kernel virtual memory  | (invisible to user code)
+------------------------+
| User stack            | (grows downward, runtime)
+------------------------+
| Memory-mapped region  | (shared libraries, printf)
+------------------------+
| Run-time heap         | (malloc, grows upward)
+------------------------+
| Read/write data       | (from executable)
+------------------------+
| Read-only code/data   | (from executable)
+------------------------+ 0x08048000 (32-bit)
                          0x00400000 (64-bit)

Managed by: OS + MMU (Memory Management Unit)

Benefits:

  • Process isolation (can't access other processes)
  • Simplified programming (contiguous addresses)
  • Efficient memory sharing (libraries loaded once)

Go deeper:

From Quiz: REVE1 / Overview of Computer Systems | Updated: Jul 07, 2026