Guides to (mostly) Harmless Hacking Volume 5 Number 5: Amit
Rawat's Guides to Kernel Hacking, #3: Memory Management Each
process has its own private address space. The address space is
initially divided into three logical segments: text, data, and
stack. The text segment is read-only and contains the machine
instructions of a program. The data and stack segments are both
readable and writeable. The data segment contains the
initialized and uninitialized data portions of a program,
whereas the stack segment holds the application's run-time
stack. On most machines, the stack segment is extended
automatically by the kernel as the process executes. A process
can expand or contract its data segment by making a system call,
whereas a process can change the size of its text segment only
when the segment's contents are overlaid with data from the file
system, or when debugging takes place. The initial contents of
the segments of a child process are duplicates of the segments
of a parent process. The entire contents o