Fwd: [Patch] to ld/emultempl/pe.em; reduce default stacksize
Danny Smith
danny_r_smith_2001@yahoo.co.nz
Mon Jun 4 18:27:00 GMT 2001
This patch has bee committed to MAIN
--- Danny Smith <danny_r_smith_2001@yahoo.co.nz> wrote: > Date: Tue, 5 Jun 2001
10:31:35 +1000 (EST)
> From: Danny Smith <danny_r_smith_2001@yahoo.co.nz>
> Subject: [Patch] to ld/emultempl/pe.em; reduce default stacksize
> To: DJ Delorie <dj@delorie.com>
> CC: binutils@sources.redhat.com
>
>
> --- DJ Delorie <dj@delorie.com> 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 <danny_r_smith_2001@yahoo.co.nz>
>
> * 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!
More information about the Cygwin-apps
mailing list