Possible Duplicate:
In C++, why shouldnew
be used as little as possible?
Where are automatic variables allocated in C++? On the stack or the heap?
Also, I read in 7.9 — The stack and the heap that all memory allocated on the stack is known at compile time. Is it true? Does it mean that only static memory allocation happens on the stack?
Also, please mention links, references to a a complete explanatory text about memory allocation in C++.