Segmentation fault

James E Wilson wilson@specifixinc.com
Mon Jul 26 23:56:00 GMT 2004


Pandey, Pooja wrote:
> While i am running my prog for 500x700 matrix its working fine with out any prob.. but
> while wroking with 1000x1500 matrix ...program is giving segmentation fault...

You probably exceeded a resource limit (see getrlimit and setrlimit). 
Most likely the stack size limit.  500x700 double array is 2.8MB, but 
1000x1500 is 12MB, and the stack size default limit is often 8MB. 
Either increase the stack size limit, or (better) don't put this data on 
the stack.

If you are running bash, see the "ulimit" command.  If you are running 
csh, see the "limit" command.
-- 
Jim Wilson, GNU Tools Support, http://www.SpecifixInc.com



More information about the Gcc-bugs mailing list