Files
GDB-tutorial/process-stack.txt
2025-10-16 18:00:59 +00:00

36 lines
1.0 KiB
Plaintext

Section 7: Foundation of Processes (Part A):
--------------------------------------------
-> The Program Stack:
++++++++++++++++++
+-----------------------+
| Bottom of stack |
+-----------------------+
| stack | <- Fixed size*1
+-----------------------+
| (Unallocated) |
+-----------------------+
| Heap (Dynamic Data)|
+-----------------------+
| Static Data |
+-----------------------+
| Literals | <- Like String literals
+-----------------------+
| Instructions | <- This section contains the code (asm code)
+-----------------------+
| Top of stack |
+-----------------------+
*1
By fixed size we mean that when we compile the program
the size of the stack is predetermined. We can increment
the size of the stack but the size is fixed once compiled.
Fun fact: NASA use only stack memory for their embedded system
while writing code for their rovers.
-> What is a Call stack?
+++++++++++++++++++++