|
|
EDA365欢迎您登录!
您需要 登录 才可以下载或查看,没有帐号?注册
x
在Linux下运行某个程序,总是遇到Segmentation fault错误。同样程序在自己的PC windows下运行正常,查看Linux机器,内存足够。Intel 官网上给的解决方案是:http://software.intel.com/en-us/ ... segmentation-fault/7 E1 C$ B9 C' [" K* {2 s( q' N; c
+ f7 ^, j: G2 T3 I7 tOn Linux*, the stack space can be increased using:
( f3 ~( j: ?9 p/ t) ], L. dulimit -s unlimited for bash shell, or
# O. f) K* p K- }2 s( n; Elimit stacksize unlimited for csh shell.
& U9 L2 X V- @4 k; ?# W" O8 @, s9 s2 W2 L0 q; y! W& o
1 }/ d' c% z0 d' e: B4 D3 w原因是初始分配的stack空间不足,将其设置为 unlimited即可。
+ M% _$ L _' R& u0 e( `, o
( D8 V+ `# D! J5 c' Z1 W
?0 F( C) K1 W4 lLinux: 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.
& f& G6 h9 a6 P) R! j+ [ `% C- y% M+ z1 B' \
|
|