How t
o increase stack size when compiling a C++ program using MinGW compiler
- 它对较小的堆栈大小有效吗?
-
是的,它适用于较小的值,例如10,000。如果我尝试1,000,000,则根本不起作用。我没有收到任何错误消息,程序只是结束了。
-
那对我没有帮助。我没有更改代码的能力。我不允许更改代码。它不是我的代码,是我的教授的代码,他严格地说不要更改代码。我只需要增加堆栈大小即可。好的,1GB太高了,我没打算让堆栈那么高。我不知道该说些什么。
-
我只能建议您将堆栈大小减半,直到找到一个可以正常运行的exe值,然后查看该值是否在不耗尽堆栈空间的情况下运行。
-
我能够弄清楚。如果其他人有相同的问题,我在下面发布了答案。