This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Segmentation fault


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



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]