I just learned about stacks, call stack(function calls), and main memory execution.
Function calls and variable declarations go on top of each other in stack.
Ex.
I a() I
I b() I
I___ I
so b() is pushed first, and then a().
*** Question: ***
When it comes to the execution process, does the main memory starts from bottom to top or top to bottom ?
Last edited on
When it comes to the execution process, does the main memory starts from bottom to top or top to bottom? |
On x86, the stack grows downwards. In other words, pushing a
variable value on the stack decrements the stack pointer.
Last edited on