What's the difference between a heap and a stack?
Anónimo
This is a question of low-level memory model of languages like C and Rust. Stack is an area of memory that's pre-allocated by the linker and is used for local variables and a function call stack. Heap is an (optional) area of memory that's used for dynamic memory allocation.