Ludicrously small default stack (was: Re: GDB 6.0 and FreeBSD threads)

Niall Douglas s_sourceforge at nedprod.com
Sat Mar 27 17:57:02 PST 2004


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 27 Mar 2004 at 22:53, Niall Douglas wrote:

> fantastic support, just enough to help me find this bug (it's weird -
> it's almost as though g++ is writing off the end of the stack ie; bad
> code generation. Yet surely if that were the case, we'd have the same
> SIGSEGV on Linux :( ).

I've just discovered that the default stack size on FreeBSD is 64Kb, 
so my words were far more precient than I knew.

May I ask what possible grounds there are for this? That is a 
*ludicrously* small number. A reasonable minimum is 256Kb, even 512Kb 
- - Windows goes with 1Mb. In modern systems the memory is committed on 
demand so no memory is being wasted except virtual address space, and 
even with the 1Mb chunks Windows uses gives a space for well over 
1000 threads. This last concern goes away for the next 20 years with 
64 bit architectures.

Cheers,
Niall





-----BEGIN PGP SIGNATURE-----
Version: idw's PGP-Frontend 4.9.6.1 / 9-2003 + PGP 8.0.2

iQA/AwUBQGYxDcEcvDLFGKbPEQLv8wCgj+xcFrRvp96Y0QyD7seKcuv+NZsAnRx2
Vqcb+0a3r2kSUlkfM2yu58Gx
=jErg
-----END PGP SIGNATURE-----


More information about the freebsd-threads mailing list