Two registers, %ebp (frame pointer) and %esp (stack pointer) contain the addresses of the bottom and the top, respectively, of a function's stack frame when it is executing.
Memory, including stack, when main has called f, and f has set up its stack frame.
low memory address | Text (compiled, linked code) |
Global Data | |
heap area | |
(%esp) |
(top of f's stack frame) f's stack frame |
(%ebp) | bottom of f's stack frame |
main's stack frame |