WATCH THIS
https://www.youtube.com/watch?v=IX3fDYz0WyM
Stack
- primitive types
- fixed memory allocation, easy to handle
- throw away after function
- in Rust:
i32
, u32
Heap
- complex, because memory needed is unknown, can change
- arrays, objects
- often pointers
- often garbage collector needed