### General - let's say before a call, the next memory address for stack would be 0x0004 - once we call a function, we keep the return address (where we started) - we also keep the - function arguments - local variables in function body - once function finishes, stack pointer moves back to the return address ``` void create_typist(int uses_nvim) { int wpm = 150; char name[4] = {'t', 'e', 'e', 'j'}; } ``` ![[stack.png]] ### Downsides - as soon as a function returns, the entire stack frame is removed (lifetime based on call) - this means that any pointers into it become invalid (dangerous) - this does not happen in [[Heap Memory]] (lifetime until I free it)