C ++ manual extension of the system stack

1. Add the header file

#include<cstdlib>

2.int main () function plus the best front

int size(40<<20);
__asm__ ( "movq %0, %%rsp\n"::"r"((char*)malloc(size)+size));

3.int main () function and finally add

exit(0);

-------------------------------------------------- ------------
hint: use this method, native compile or run the results may not be to your satisfaction when you submit only onlinejudge

Guess you like

Origin www.cnblogs.com/ling-zhi/p/11620098.html