previous | start | next

Stack After f's Stack Frame Setup Code

After function f executes

        pushl %ebp
        movl  %esp, %ebp
        subl  $8, %esp      
   

The stack frame for f contains

low memory address Text (compiled, linked code)
  Global Data
  heap area
(%esp) (top of f's stack frame)

f's stack frame

(%ebp) main's saved %ebp value
4(%ebp) return address in main's code
  main's stack frame


previous | start | next