|
|
EDA365欢迎您登录!
您需要 登录 才可以下载或查看,没有帐号?注册
x
在Linux下运行某个程序,总是遇到Segmentation fault错误。同样程序在自己的PC windows下运行正常,查看Linux机器,内存足够。Intel 官网上给的解决方案是:http://software.intel.com/en-us/ ... segmentation-fault/
8 c6 O$ P2 ?5 m2 @4 E) q. `; H6 A }* p" x
On Linux*, the stack space can be increased using:
0 A S# i O Lulimit -s unlimited for bash shell, or / v1 d: u, c* B# B& a6 G% o
limit stacksize unlimited for csh shell.
5 V* @- ^# v) m% R5 M. L2 |
5 I+ ]& k9 A& D( i; x6 I1 v: Q
% w# z6 z; Y- _2 z1 l原因是初始分配的stack空间不足,将其设置为 unlimited即可。
5 f7 d. T# h Z- n; m( y. K3 l7 } T0 c, n8 A
$ M. S4 `7 P w8 [Linux: The size of "unlimited" varies by Linux configuration, so you may need to specify a larger, specific number to ulimit (for example, 999999999). On Linux also note that many 32bit Linux distributions ship with a pthread static library (libpthread.a) that at runtime will fix the stacksize to 2093056 bytes regardless of the ulimit setting. To avoid this problem do not link with the -static option or the -fast option. Instead of -fast, use options: -ipo -O3 -no-prec-div -xP . This only affects the 32bit Linux distributions and does not apply to the 64bit Linux distributions.
6 b% X* u! `1 [7 `# z3 N7 k- B. b+ b- p; N4 C( `
|
|