X-Spam-Check-By: sourceware.org Date: Thu, 30 Mar 2006 13:08:01 +0200 From: Corinna Vinschen To: cygwin AT cygwin DOT com Subject: Re: segfault on memory intensive programs Message-ID: <20060330110801.GA18039@calimero.vinschen.de> Reply-To: cygwin AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com References: <20060329202148 DOT 42196 DOT qmail AT web34802 DOT mail DOT mud DOT yahoo DOT com> <062f01c653e4$cc9eb5c0$a501a8c0 AT CAM DOT ARTIMI DOT COM> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <062f01c653e4$cc9eb5c0$a501a8c0@CAM.ARTIMI.COM> User-Agent: Mutt/1.4.2i Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com On Mar 30 11:29, Dave Korn wrote: > On 29 March 2006 21:22, Pete wrote: > > > 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]; > > ... > > > > Your testcase didn't even compile for me! It complained about those three > dots! > > > 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. No wonder. 600**3 * sizeof (int) * 3 == 2592000000 ~= 2.4 Gigs. Somehow I doubt that this works at all. Each Windows process has only up to 2 Gigs of memory, except the Windows kernel has been started with the /3G option. In these 2 Gigs, you also have to have room for the DLLs. Assuming the Cygwin DLL is the lowest DLL in memory at 0x61000000, and assuming the application is loaded at 0x400000, as usual, you have typically left 0x61000000 - 0x400000 == 0x60c00000 == 1623195648 ~= 1.5Gigs left for the application. Corinna -- Corinna Vinschen Please, send mails regarding Cygwin to Cygwin Project Co-Leader cygwin AT cygwin DOT com Red Hat -- 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/