A process, from far away
hello
kernel
memory
cpu
source
address space
one square a page of 4096 bytes · low addresses on top
55d4
a1c0
1000
r
x
hello
4K
55d4
a1c0
2000
r
hello
4K
55d4
a1c0
3000
r
w
hello
8K
55d4
a2e5
f000
r
w
heap
132K
7f3c
5e20
0000
r
x
libc.so.6
2.1M
7f3c
5e5c
2000
r
x
ld.so
216K
7ffd
3a2a
2000
r
w
stack
132K
7ffd
3a3d
1000
r
x
vdso
8K
ffff80000000
kernel
the upper half of every address space
one page of the stack
4096 bytes
3640 bytes above
3a2c
1e38
3a2c
1e40
48
65
6c
6c
6f
2c
20
77
3a2c
1e48
6f
72
6c
64
21
0a
00
00
3a2c
1e50
00
3f
9a
c1
77
d2
8e
5b
3a2c
1e58
40
1e
2c
3a
fd
7f
00
00
416 below
system calls
time runs right · width is time spent in the kernel
user
kernel
execve
openat
mprotect
write
exit_group
the dynamic loader
main
Before main runs a single line, the loader has already
asked the kernel for memory a dozen times.