Pergunta de entrevista da empresa Foundation Devices

What's the difference between a heap and a stack?

Resposta da entrevista

Sigiloso

18 de jan. de 2022

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.