Maximum Stack Size for C/C+ Program?

后端 未结 4 1894
轻奢々
轻奢々 2020-12-01 12:42

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];
           


        
4条回答
  •  天命终不由人
    2020-12-01 12:50

    To change the size of the stack allocated for the main thread that is raised by the process loader to run the code at it's entry point, look to your linker documentation. It's also possible to edit that stack size in the executable header metadata.

提交回复
热议问题