Does stack size increase at runtime?

I wonder if the stack size can grow like a heap at runtime?

+3
source share
6 answers

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.

+5
source

, /, , . . + os , .

+1

.

. , . , ( ). . , POSIX.1-2001 getrlimit().

, , , .

+1

, , , . , , ( , ). , , , .

0

. , .

-1
source

Source: https://habr.com/ru/post/1721758/


All Articles