October 16, 2017

The stack area, stack frame and the function prologue/epilogue

❑ Function prologue: A code at the beginning of a function that creates a stack frame.
* PUSH EBP
MOV EBP, ESP

❑ Function epilogue: A code at the end of the function that removes the stack frame and returns.
* MOV ESP, EBP
POP EBP
RET

❑ Stack frame: The stack space on memory for each function call. There are may stack frames in the stack area.

❑ Stack area: It is the stack data structure existing in memory. It is also called call stack.