mirror of
https://github.com/Hizenberg469/GDB-tutorial.git
synced 2026-04-19 22:02:23 +03:00
Process stack
This commit is contained in:
35
process-stack.txt
Normal file
35
process-stack.txt
Normal file
@@ -0,0 +1,35 @@
|
|||||||
|
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?
|
||||||
|
+++++++++++++++++++++
|
||||||
Reference in New Issue
Block a user