segfault on memory intensive programs

Dave Korn dave.korn@artimi.com
Thu Mar 30 13:33:00 GMT 2006


On 30 March 2006 14:09, Alexander Herrmann wrote:


>> int main( void )
>> {
>>         // Set up the timer and start it ticking.
>>         Timer timer;
>>         timer.startTimer();
>> 
>>         // We multiply m1 and m2, and put the result in m3.
>>         int m1[N][N];
>>         int m2[N][N];
>>         int m3[N][N];
>> ...
>> 
>> 
>> On Cygwin, the code runs fine for a matrix rank
>> between 400 and 0.  Somewhere N=400 and N=600, the
>> program segfaults under Cygwin.
> m1[N][N], m2[N][N] and m3[N][N] is static memory so why should it fail?

  No, those are stack-based 'auto' variables.  Unless you've got some
different version of the source than what was posted about.


> Additionaly you can make it static 

   See, if you think it's already static memory, how do you think he can make
it any more static than it already is?


    cheers,
      DaveK
-- 
Can't think of a witty .sigline today....


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/



More information about the Cygwin mailing list