转载:https://blog.csdn.net/tt2767/article/details/47620749?utm_source=blogxgwz0
G++:
写入主程序最前方
int size = 256 << 20; // 256MB
char *p = (char*)malloc(size) + size;
__asm__("movl %0, %%esp\n" :: "r"(p));
C++:
写入头文件
#pragma comment(linker, "/STACK:102400000,102400000")