Question about our default pthread stack size

Joe Marcus Clarke marcus at FreeBSD.org
Fri Nov 19 09:52:39 PST 2004


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

Daniel Eischen wrote:
| On Fri, 19 Nov 2004, Alexander Nedotsukov wrote:
|
|
|>Hey guys,
|>
|>After squashing yet another "too small thread stack size" bug in
|>software developed on Linux. I decided to ask gurus for the comment. Why
|>we still insist that 64K is good enough for 32bit archs? I do understand
|
|
| I suggested we double the stack size for 64-bit archs (making it
| 128K).  I could see going to 256K for 32-bit and 512K for 64-bit.

ia64 already uses a 256 KB default stack size.  However, I argue that is
is "too small."  Linux has a much higher default (inline with the
document bland referenced), and thus, most popular multithreaded
applications are developed with that in mind.

It has become some problematic for GNOME, for example, that I have
hacked glib20 to allocate a default 1 MB stack on all architectures
(this is, of course, configurable).

|
| We haven't worried too much about stack size since everything
| has been running with libc_r for years without too many problems
| and it's been using the same stack size.

I think we should revisit this decision, and do something similar to
what is outlined in the Sun document.  Going to at least 1 MB on all
architectures would ensure more popular software runs out-of-the-box on
FreeBSD.

Joe

|


- --
Joe Marcus Clarke
FreeBSD GNOME Team	::	gnome at FreeBSD.org
FreeNode / #freebsd-gnome
http://www.FreeBSD.org/gnome
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.6 (Darwin)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFBnjLsb2iPiv4Uz4cRAjeiAKCpAIEvg4KPdLMy1DGYQw78fM58lgCcDBt6
8sDV+TOf6dyNs6pVVSnY96Q=
=sKab
-----END PGP SIGNATURE-----


More information about the freebsd-threads mailing list