X-Recipient: archive-cygwin AT delorie DOT com DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:date:from:to:subject:message-id:reply-to :references:mime-version:content-type:in-reply-to; q=dns; s= default; b=OYUP0RlVLEnBEWcpWpyAqXPI23R2DAYMYB8BSCVyCpnYRUFZTe3Bp LfDCb0OvXfGAkohjxm3+4jN7NGEuz6+jXX3b7LNRHSnjlIw7/4s1GrAm7+4BWKrn gOWVZXyIYwIZYTCLCdczzHtV4NfI7s9J1thxgwbRiu7DwhfGpmny9w= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:date:from:to:subject:message-id:reply-to :references:mime-version:content-type:in-reply-to; s=default; bh=QLb4wY+SMzFbGXYAyZwjmPefxsw=; b=dOqpf9d2XuXvoYIoSJSW7x3c/oix RFCzSUmWWnw6sz5LidUurPBWHqEN/CSNJn8TXU4mT4nJe9+ipVfvow/TJicT7a4H uDvSBxyDE8QnRu4mq+/3ypAyaSFYjn7e9/Xvl/EJIjKZaPbBvk66K9mX3/QKt/ND +VIzwOkfSbcR0zk= Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com X-Spam-SWARE-Status: No, score=-4.4 required=5.0 tests=AWL,BAYES_00,KHOP_PGP_SIGNED autolearn=ham version=3.3.2 Date: Mon, 19 Aug 2013 11:32:42 +0200 From: Corinna Vinschen To: cygwin AT cygwin DOT com Subject: Re: Stack size on 64-bit Cygwin Message-ID: <20130819093242.GB18757@calimero.vinschen.de> Reply-To: cygwin AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com References: <520E905A DOT 409 AT cornell DOT edu> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="H+4ONPRPur6+Ovig" Content-Disposition: inline In-Reply-To: <520E905A.409@cornell.edu> User-Agent: Mutt/1.5.21 (2010-09-15) X-Virus-Found: No --H+4ONPRPur6+Ovig Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Aug 16 16:49, Ken Brown wrote: > The problem that has been discussed at length in the thread "64-bit > emacs crashes a lot" appears to have been solved on the emacs-devel > list. (I say "appears to" because I'm waiting for Ryan to confirm > this.) The problem went away for me when I built emacs with > 'LDFLAGS=3D-Wl,--stack,4194304'. I'm wondering if it's just that > emacs needs an unusually big stack or if the default stack size on > 64-bit Cygwin should be increased for all applications. >=20 > I noticed that ulimit -s gives 2025 on both 32-bit Cygwin and 64-bit > Cygwin. Shouldn't 64-bit applications need a larger stack than > 32-bit applications in general? Well, in fact 2 Megs is a pretty big stack to begin with. If you check the Windows executables in C:\Windows\system32, you'll notice that a predominant number of them have their stacksize set to <=3D 1 Meg. Also, if you don't set the default stack size explicitely when building applications with VC++, the default stacksize will be set to 1 Meg on both platforms, x86 and x64. So, by setting the default stacksize to 2 Megs, gcc is already leaning towards the safe side and it's *much* more than most applications really need. From my POV, if you have a stack-active application, just add the aforementioned --stack linker option, or call peflags -x after the build. The latter can be done any time, for instance: tcsh$ peflags -x /bin/bash /bin/bash: stack reserve size : 2097152 (0x200000) bytes tcsh$ bash -c 'ulimit -s' 2025 tcsh$ peflags -x0x400000 /bin/bash /bin/bash: stack reserve size : 4194304 (0x400000) bytes tcsh$ bash -c 'ulimit -s' 4073 Corinna --=20 Corinna Vinschen Please, send mails regarding Cygwin to Cygwin Maintainer cygwin AT cygwin DOT com Red Hat --H+4ONPRPur6+Ovig Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.14 (GNU/Linux) iQIcBAEBAgAGBQJSEeY5AAoJEPU2Bp2uRE+gNpAQAJJwmS9iuY5BB58sEjCMqsa4 zkQh/6sRmCvRCDNU0uopTTYGb/wo0epvMVdo2syAtY7NaQurd+49dmc74zYxx0Gk g4U+jtN91VnjASRTDQhenaoSuFhk3NwyJHpXWsbH5FZrVY6QTgwCx+woITD9uK0m f6uLWwxAXADE0M98w5beKJtUS3tK2pGLzmfDpjXQbKxMwUNhRndEYkrfzqa2FKU4 OQCkF28RLXvn4mGItZbLf9P2b0rkHmSwkZF9wwxD2xq3hsJaKO/IoH7TVC493zYa Y9ElcTVg+h0tqFP0YJlzE3OEZPNqvCWgwHmSB7qHF4Y0J+AlOhedmF36PIQkQLdC zN9kJJ80rHlrZl1PN8h7Pkj1+gE7iLjYgwQYdaz87hHR3ePytbiAYQWXWjylmx1t s+nm0b42nALYa4LR4Znms4k10w9GgSjdO0K/csVg2z+Hh07DH69VIMn8gfSh5oKA bAEbtn3KtyKP5BdtPTcDPLRbXQv+79y3YE5qgQZHY7baDhRfgN745kHfRWfzsWvY Bx5vvJOrUoQWsRNK+I7nrynADRG01B7ACQ7MpFG8FNCrmDfxUyrEcrwg61k3lMHp I5Z+groGeIidek8Jv8Rb+DsL3zws37yqjY25Jl8TfEuBSUQu9VSuWDA7KKmxqIrX oATS4J9HA9xjyUTyWM2g =joG5 -----END PGP SIGNATURE----- --H+4ONPRPur6+Ovig--