ACM的奇计淫巧_扩栈C++/G++

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

 

posted @ 2015-08-11 23:43  好地方bug  阅读(2360)  评论(0编辑  收藏  举报