|
|
EDA365欢迎您登录!
您需要 登录 才可以下载或查看,没有帐号?注册
x
在Linux下运行某个程序,总是遇到Segmentation fault错误。同样程序在自己的PC windows下运行正常,查看Linux机器,内存足够。Intel 官网上给的解决方案是:http://software.intel.com/en-us/ ... segmentation-fault/" ^$ n1 ~4 X O1 U' c. L# b
) y/ b0 j; M1 u5 @$ sOn Linux*, the stack space can be increased using:: j3 R, B5 R4 Z W8 z$ m/ O
ulimit -s unlimited for bash shell, or 2 B7 S2 Y6 x: y
limit stacksize unlimited for csh shell.9 d, P0 A5 L7 q8 \5 B
8 r" ~& A9 J+ w/ h
2 ]) q% l2 j3 J原因是初始分配的stack空间不足,将其设置为 unlimited即可。
+ ^- G$ _* X8 m+ R: p- P; ]5 L/ i L6 `' U1 b, y
9 u/ V/ O( ?2 e4 S. V1 ^
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.( f9 @; l6 k6 U- k1 [- I5 x
# ^7 I8 u% V. [: b) C2 z6 t
|
|