delorie.com/archives/browse.cgi | search |
X-Spam-Check-By: | sourceware.org |
From: | "Dave Korn" <dave DOT korn AT artimi DOT com> |
To: | <cygwin AT cygwin DOT com> |
Subject: | RE: segfault on memory intensive programs |
Date: | Thu, 30 Mar 2006 14:58:36 +0100 |
Message-ID: | <065c01c65402$0a568d30$a501a8c0@CAM.ARTIMI.COM> |
MIME-Version: | 1.0 |
In-Reply-To: | <20060330133347.26691.qmail@web34802.mail.mud.yahoo.com> |
Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
List-Unsubscribe: | <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com> |
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 |
On 30 March 2006 14:34, Pete wrote: > The executable is produced with: > > $ make > g++ -W -Wall -O9 -funroll-loops -mtune=pentium4 -c > -o matrix_mult_r.o matrix_mult_r.cc Heh. matrix_mult_r.cc:5:19: Timer.h: No such file or directory matrix_mult_r.cc: In function `int main()': matrix_mult_r.cc:20: error: `Timer' undeclared (first use this function) matrix_mult_r.cc:20: error: (Each undeclared identifier is reported only once for each function it appears in.) matrix_mult_r.cc:20: error: expected `;' before "timer" matrix_mult_r.cc:21: error: `timer' undeclared (first use this function) > g++ -W -Wall -O9 -funroll-loops -mtune=pentium4 -c > -o Timer.o Timer.cc Ah, yes. I had a bit of a problem with that particular stage of the proceedings as well.... However, it's straightforward enough. The default thread stack is 1Mb (or is it 2, I can't remember off the top of my head). Once your stack-based auto vars exceed the size of the stack, it go BOOOOOM! Your problem can be fixed /either/ by making them of static storage duration (move them out of the function body OR add the 'static' qualifier depending on scoping considerations), or by using the -Wl,--stack flag. Correctly. You told ld to provide an 8kB stack. Try 80 meg instead, it works a lot beter! 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/
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |