Sollicitatievraag bij Garmin

Difference between "stack" and "heap"?

Antwoord op sollicitatievraag

Anoniem

20 mei 2013

The answer they were expecting is that in GCC and other mainstream compilers, one grows from one end of the free memory and the other grows from the other. If they meet, your program crashes. The compiler I use for a specific chip uses a different memory structure. The stack is a separate area of memory and can't grow into the heap. When I said that, they looked at me like I had two heads.

1