diff --git a/process-stack.txt b/process-stack.txt new file mode 100644 index 0000000..52ed9f4 --- /dev/null +++ b/process-stack.txt @@ -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? + +++++++++++++++++++++