C++:
#pragma comment(linker, "/STACK:102400000,102400000")//手动开大栈区
G++:
int size = 256 << 20; // 256MB
char *p = (char*)malloc(size) + size;
__asm__("movl %0, %%esp\n" :: "r"(p));
手工扩栈的方法
最新推荐文章于 2021-11-17 22:53:58 发布
C++:
#pragma comment(linker, "/STACK:102400000,102400000")//手动开大栈区
G++:
int size = 256 << 20; // 256MB
char *p = (char*)malloc(size) + size;
__asm__("movl %0, %%esp\n" :: "r"(p));