Program address space
What does the OS loader do?
Creates new process Sets up address space/segments Read executable file, load instructions, init global data
Mapped from file into green segments
Libraries loaded on demand Set up stack
Reserve stack segment, init %rsp, call main
malloc written in C, will init self on use
Asks OS for large memory region, parcels out to service requests
Stack ⬇ ⬆ Heap Global data Text (machine code)
0x400000
Shared library text/data
0x7ffff770000 0x600000 0x7ffffffff0000 Sized for executable Grows on demand 8MB reserved Sized for library