Linux Core - Memory Layout
32Bits CPU Memory Layout
Common Segment
BSS Segment
Uninitialized global
, static
variables, filled with zeros
.
Data Segment
Initialized global
, static
variables initialized by the programmer.
Text Segment
A.k.a ELF, stores the binary image of the process.
brk and sbrk
functions to change program break
position. a typical usage: brk v.s. sbrk
Memory Addressing
32bits CPU addressing v.s. 64 bits CPU addressing
type | max addressing | size |
---|---|---|
32bits | 0x00000000 ~ 0xFFFFFFFF | |
64bits | 0x00000000 ~ 0xFFFFFFFFFFFFFFFF |