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:message-id:date:from:mime-version:to:subject :references:in-reply-to:content-type:content-transfer-encoding; q=dns; s=default; b=A2LN+E4aceTfHEus2pX9SEW8lvFEINADvp2o0TdE3oU FwjIeFMXyEDJLmbrDWPPX6/vflhhdr/ao92Hg8AZExP4/yAwz7A4pQEb/P6l1GOA pgAsKHm/8o8c8lJBX3aIpls/foPs6YQj9ISLK580lHFxhIk2TnE8+3T6YPsU846Q = 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:message-id:date:from:mime-version:to:subject :references:in-reply-to:content-type:content-transfer-encoding; s=default; bh=AlLWqpD0lrTA5Vdt3fBP2pH1E6o=; b=oNoYx+PF1R0K9ZQBF OOuzHt57KS1iUKRcC12Qw1EsPPwW3M//Vo9qaj8uoqlj+57bnjbOtZOlPZwMf2VN JQ0XAC81RnBJ+vQSno5sTakRxYSEJgdBsxRStdMcIrLLQfmXcRkX0yyYjrUbRh+j eJDs52YmQn9Q2349EFZWsON5T4= 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.8 required=5.0 tests=AWL,BAYES_00,KHOP_THREADED,RCVD_IN_HOSTKARMA_YE,RP_MATCHES_RCVD,SPF_PASS autolearn=ham version=3.3.2 X-CornellRouted: This message has been Routed already. Message-ID: <5211F82E.5070803@cornell.edu> Date: Mon, 19 Aug 2013 06:49:18 -0400 From: Ken Brown User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20130620 Thunderbird/17.0.7 MIME-Version: 1.0 To: cygwin AT cygwin DOT com Subject: Re: Stack size on 64-bit Cygwin References: <520E905A DOT 409 AT cornell DOT edu> <20130819093242 DOT GB18757 AT calimero DOT vinschen DOT de> In-Reply-To: <20130819093242.GB18757@calimero.vinschen.de> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 8/19/2013 5:32 AM, Corinna Vinschen wrote: > 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=-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. >> >> 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 <= 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 OK, thanks. I'll just use the --stack option the next time I rebuild emacs. But it's good to know that users can change this themselves with peflags. Ken -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple