I've tried the below program. The intent by which this program was created is to discover more about stack sizes.
int main()
{
int nStack[100000000];
return 0;
}
After executing the above code, the program crashes due to huge stack size allocation. What is the maximum possible size of the stack? Is it fixed for every program/computer? Can it be increased?
I want to know for the sake of knowledge. If anyone can provide examples in C/C++, it would be very helpful.
See Question&Answers more detail:os