Stack and stack
Difference:
Heap: allocated and freed by programmers
Stack: automatically allocated and released by the compiler, storing the return value of the function, local variables
Usage skills:
The stack of tasks in embedded systems is very small, try not to allocate variables that occupy large memory on the stack, and do not use recursive methods to design programs to prevent stack overflow.
The three most important segments of an executable program:
.text: code to store program
.data: initialized data
.bss: No variables initialized properly