Eli5-What does a “stack overflow” mean?

1.21K views

Eli5-What does a “stack overflow” mean?

In: 847

41 Answers

Anonymous 0 Comments

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”.

You are viewing 1 out of 41 answers, click here to view all answers.