Written By: B. Vinoth Raj, Senior Software Consultant, Mindfire Solutions
What is Call Stack?
Call Stack is a stack that contains a collection of stack frames.
What is a Stack Frame?
A Stack Frame, also called as activation record, contains information about function call.
- When a program runs, the call stack contains at least one stack frame, which is for the main function. A stack frame is created whenever a function is invoked.
- Arguments are inserted into stack frame from right to left.
- The stack grows from higher addresses to lower addresses
- A stack pointer register is used to mark the “top” of the stack.