A segment fault occurs if ...
A process generates an address that falls is not between the start and end addresses of any of the process's segments (areas).
Process virtual memory | |
---|---|
Process-specific data page tables, mm_structs, kernel stack |
|
Physical memory mapped into kernel's virtual memory |
|
Kernel code and data | |
User stack | |
Shared libraries | |
<-- brk | |
Heap | |
Uninitialized Data | |
Initialized Data | |
Program Text | |