PDA

View Full Version : Please explain the term stacking overhead in C++



sana.pari
04-24-2011, 05:52 PM
Please explain the term stacking overhead.Stack is special kind of data structure which is used in C/C++ to store the parameters of any function when it is being called.

Support
04-24-2011, 05:52 PM
Stack is special kind of data structure which is used in C/C++ to store the parameters of any function when it is being called. Whever we call a function in our program, the parameters which are passed to the function during its function call are stored onto the stack temporarily. Also each function is associated with an address which recognizes that function, this address is also pushed(stored) on stack. Stack is very useful in storing information related to functions but since stack has limited memory resources. In case if a lot of functions beign used/called in a program, parameters and adresses of all the functions are pushed on the stack which may result into exceeding the stack limit which is termed as Stacking Overhead.