Mailing-List: contact cygwin-apps-help AT sourceware DOT cygnus DOT com; run by ezmlm Sender: cygwin-apps-owner AT sourceware DOT cygnus DOT com List-Subscribe: List-Archive: List-Post: List-Help: , Delivered-To: mailing list cygwin-apps AT sources DOT redhat DOT com Message-ID: <20010605012742.75888.qmail@web14505.mail.yahoo.com> Date: Tue, 5 Jun 2001 11:27:42 +1000 (EST) From: =?iso-8859-1?q?Danny=20Smith?= Subject: Fwd: [Patch] to ld/emultempl/pe.em; reduce default stacksize To: cygwin-apps MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit This patch has bee committed to MAIN --- Danny Smith wrote: > Date: Tue, 5 Jun 2001 10:31:35 +1000 (EST) > From: Danny Smith > Subject: [Patch] to ld/emultempl/pe.em; reduce default stacksize > To: DJ Delorie > CC: binutils AT sources DOT redhat DOT com > > > --- DJ Delorie wrote: > > > > Why is the default SizeOfStackReserve set to 0x02000000 in > > ld/emultempl/pe.em? > > > > GCC needs more than 1Mb of stack to compile itself. > > > > Since the memory is virtual anyway, allocating a lot more than you > > need doesn't hurt anything until you actually need it. > > > > Plus, you're better off asking cygwin-specific questions on the cygwin > > list, where all the cygwin experts live. > > > I wasn't satisfied with the response I got last time. > Setting the default stacksize reserve for pe targets to 32mb (0x2000000) > still > seems excessive. This high setting can cause problems with multi-thread or > multi-fiber apps, since each thread gets its own stack, with stack reserve > and > stack commit defaulting to sizes for main thread. A lot of code written for > other win32 compilers expects the default stack-size to be of order of 1 mb, > and so routinely use the default. > > See thread in cygwin list archive starting here: > http://sources.redhat.com/ml/cygwin/2001-06/msg00077.html > > This patch reduces default stack reserve to 2mb (0x200000). I have used ld > built with this patch applied to successfully complete a three stage > bootstrap > of gcc-2.95.3 with mingw32 as host and target. > > > ChangeLog > 2001-06-05 Danny Smith > > * emultempl/pe.em (init[]): Reduce default stack reserve to 0x200000. > > > --- pe.em.orig Tue Apr 24 16:21:00 2001 > +++ pe.em Tue Jun 05 10:37:34 2001 > @@ -252,7 +252,7 @@ static definfo init[] = > #endif > D(MinorSubsystemVersion,"__minor_subsystem_version__", 0), > D(Subsystem,"__subsystem__", ${SUBSYSTEM}), > - D(SizeOfStackReserve,"__size_of_stack_reserve__", 0x2000000), > + D(SizeOfStackReserve,"__size_of_stack_reserve__", 0x200000), > D(SizeOfStackCommit,"__size_of_stack_commit__", 0x1000), > D(SizeOfHeapReserve,"__size_of_heap_reserve__", 0x100000), > D(SizeOfHeapCommit,"__size_of_heap_commit__", 0x1000), > > _____________________________________________________________________________ > http://messenger.yahoo.com.au - Yahoo! Messenger > - Voice chat, mail alerts, stock quotes and favourite news and lots more! > _____________________________________________________________________________ http://messenger.yahoo.com.au - Yahoo! Messenger - Voice chat, mail alerts, stock quotes and favourite news and lots more!