From owner-freebsd-threads@FreeBSD.ORG Sat Mar 27 17:57:02 2004 Return-Path: Delivered-To: freebsd-threads@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 62A9416A4CE for ; Sat, 27 Mar 2004 17:57:02 -0800 (PST) Received: from mail2.mail.iol.ie (mail2.mail.iol.ie [193.95.141.54]) by mx1.FreeBSD.org (Postfix) with ESMTP id 02E1443D1D for ; Sat, 27 Mar 2004 17:57:02 -0800 (PST) (envelope-from s_sourceforge@nedprod.com) Received: from dialup0397.ts005.bmt.esat.net ([212.2.173.141] helo=kate) by mail2.mail.iol.ie with esmtp (Exim 3.36 #9) id 1B7PXo-0005s7-00 for freebsd-threads@freebsd.org; Sun, 28 Mar 2004 02:57:00 +0100 From: "Niall Douglas" To: freebsd-threads@freebsd.org Date: Sun, 28 Mar 2004 02:57:32 +0100 MIME-Version: 1.0 Message-ID: <40663F1C.10530.D7BC254@localhost> Priority: normal In-reply-to: <406605CC.14911.CD2D006@localhost> X-PM-Encryptor: IDWPGP-PM32, 4 X-mailer: Pegasus Mail for Windows (v4.12a) Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7BIT Content-description: Mail message body Subject: Ludicrously small default stack (was: Re: GDB 6.0 and FreeBSD threads) X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Mar 2004 01:57:02 -0000 -----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-----