Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm 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 Message-Id: <5.2.0.9.2.20030216141103.02982708@pop3.cris.com> X-Sender: rrschulz AT pop3 DOT cris DOT com Date: Sun, 16 Feb 2003 14:22:38 -0800 To: cygwin AT cygwin DOT com From: Randall R Schulz Subject: RE:size limit for static arrays in cygwin/gcc In-Reply-To: <20030216195610.12201.qmail@web21404.mail.yahoo.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed Danny, A couple of months ago, someone reported on how local (stack) allocations larger than a certain threshold were allocated on the heap. In fact, you, Danny, contributed materially to that thread: Subject "Strange behaviour of gcc" starting with a posting by fabrizio_ge-wolit AT tiscali DOT it on Dec. 24, 2002. In that case Fabrizio wanted to avoid the dependence that heap allocation created on the runtime or C library. That was C/C++ code and I don't know where this allocation strategy is implemented--i.e., whether it's in a language-specific front-end or a language-independent back-end of GCC (and here we should emphasise the official name: the GNU Compiler Collection, not the GNU C Compiler as many believe it to mean). You also supplied this tidbit: >To disable stack probing, add this switch -mno-stack-arg-probe. Just something to keep in mind. Randall Schulz At 11:56 2003-02-16, Danny Smith wrote: >"Charles D. Russell" wrote: > > > Meanwhile, I am trying to find an equivalent problem in C so > that it will > > get more attention. Unfortunately, I don't know much C. The subsequent > > program fails with a segmentation violation if one tries to allocate more > > than a few Mb of memory on either my old or my new > system. Why? What limit > > am I bumping into? > >By default stack reserve is set to 2MB by ld.exe. Try setting stack >reserve higher, eg, > -Wl,--stack=0x2000000 >will get you 32MB stack reserve > >Danny -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/