From 929284b5e4a674b6d712211e454da243d4739e4f Mon Sep 17 00:00:00 2001 From: Hizenberg Date: Thu, 16 Oct 2025 18:00:59 +0000 Subject: [PATCH] Process stack --- process-stack.txt | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 process-stack.txt 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? + +++++++++++++++++++++