The number of stacks used increases as you allocate local variables and make function calls. Is the stack the maximum size grown technically undefined, but in practice, as a rule, is constant. You can make a constant bigger with a flag in the OS, but usually each thread gets a certain stack size. When you use too much, this is a stack overflow.
source
share