The stack is a data structure, but this refers to a very specific stack. In programming you have these things called “functions” which do something, that can be as simple as adding to numbers, or they can call other functions.
Every time a function is called, the memory (RAM in this case) it has requested upfront to do its work, that memory is allocated on a stack, meaning that the latest functions to be called will be removed first as they finish and return.
A stack overflow is when too many functions have been nested and the RAM reserved for the function stack runs out, or “overflows”.
Latest Answers