This is the mail archive of the cygwin mailing list for the Cygwin 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: segfault on memory intensive programs


On 30 March 2006 13:18, Corinna Vinschen wrote:

> On Mar 30 12:14, Dave Korn wrote:
>> On 30 March 2006 12:08, Corinna Vinschen wrote:
>> 
>> 
>>>>> #define  N          600 // Matrix rank
>>>>> 	// We multiply m1 and m2, and put the result in m3. 	int m1[N][N];
>>>>> 	int m2[N][N];
>>>>> 	int m3[N][N];
>> 
>>> No wonder.  600**3 * sizeof (int) * 3 == 2592000000 ~= 2.4 Gigs.
>> 
>>   Those matrices are only 2d!
> 
> Oh, hmm.  600**2 * sizeof (int) * 3 == 4320000 = 4.1 Megs.
> 
> Maybe reserving a stack bigger than 4Megs would help, though?
> 

  There's probably a hook dll loaded low into memory and messing it up.

  Setting a breakpoint somewhere in the middle of the loop, trapping it in
windbg, and posting the output from the "lm" command might just make things
clearer.


    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/


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