|
|
EDA365欢迎您登录!
您需要 登录 才可以下载或查看,没有帐号?注册
x
在Linux下运行某个程序,总是遇到Segmentation fault错误。同样程序在自己的PC windows下运行正常,查看Linux机器,内存足够。Intel 官网上给的解决方案是:http://software.intel.com/en-us/ ... segmentation-fault/! B4 A( A9 }$ `' m
_( p7 N5 ?8 u8 x4 W/ U* [4 `: x0 ^On Linux*, the stack space can be increased using:& q/ b! S, `- ~: d- U# J
ulimit -s unlimited for bash shell, or
/ V) z! M* ^! o4 ^& g# Jlimit stacksize unlimited for csh shell.& [ l8 |) ?; Z) B0 V7 f9 I. K
( h0 {) R& ^/ R- s8 R% b+ h( A, r) G
- V" }8 J- z" b# J原因是初始分配的stack空间不足,将其设置为 unlimited即可。 9 e0 I8 v* d# R
6 o9 N, W0 Z) G R) Q6 h
! Q5 Y3 ~5 i4 j |/ L3 T! s
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.' ?/ Y) _0 ]* k- N, g
/ _, G; s3 i3 w( Y8 L; { q- A
|
|