delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2006/03/29/15:22:01

X-Spam-Check-By: sourceware.org
Message-ID: <20060329202148.42196.qmail@web34802.mail.mud.yahoo.com>
Date: Wed, 29 Mar 2006 12:21:48 -0800 (PST)
From: Pete <null_geodesic AT yahoo DOT com>
Subject: segfault on memory intensive programs
To: cygwin AT cygwin DOT com
MIME-Version: 1.0
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

I have some benchmarkign code

#define  N          600 // Matrix rank
#define ITERATIONS 2000



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.

However, it runs on VC++.  And a Java-ized port of the
program runs fine under Sun and BEA java for N=600.

I've tried increasing the heap and stack size for
Cygwin as per the FAQ, but the FAQ's solution doesn't
seem to be working: I tried adding the key to the
registery as per 

http://cygwin.com/cygwin-ug-net/setup-maxmem.html

and compiling with:

gcc -Wl,--heap,4096,--stack,4096 -o foo foo.c

but nothing seems to prevent the application for
segfaulting under cygwin when N=600.

Any ideas on how I can make this program not crash
under cygwin for high matrix rank?  VC++ and java can
do it.  I'm sure cygwin can too.

Thanks.
Pete

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

--
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/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019