mirror of
https://github.com/Hizenberg469/GDB-tutorial.git
synced 2026-04-19 22:02:23 +03:00
36 lines
1.0 KiB
Plaintext
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?
|
|
+++++++++++++++++++++
|