【发布时间】:2013-01-06 10:49:44
【问题描述】:
堆栈分配有很多相关的问题是可以理解的
What and where are the stack and heap?
Why is there a limit on the stack size?
但是在各种 *nix 机器上我可以发出 bash 命令
ulimit -s unlimited
或 csh 命令
set stacksize unlimited
这如何改变程序的执行方式?对程序或系统性能是否有任何影响(例如,为什么这不是默认设置)?
如果涉及更多系统细节,我主要关心的是在 x86_64 硬件上运行的 Linux 上使用 GCC 编译的程序。
【问题讨论】: