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.20030217165926.0475fd70@pop3.cris.com> X-Sender: rrschulz AT pop3 DOT cris DOT com Date: Mon, 17 Feb 2003 17:04:52 -0800 To: cygwin AT cygwin DOT com From: Randall R Schulz Subject: RE:size limit for static arrays in cygwin/gcc In-Reply-To: <20030217205514.36613.qmail@web21402.mail.yahoo.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed Danny, At 12:55 2003-02-17, Danny Smith wrote: >Randall R Schulz wrote: > > > 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. > >No that's not quite right: > >Stack allocations larger than one page (4KB) cause gcc to probe the stack. >The allocation is still static I was clearly confused about what "alloca" does: It allocates space on the stack, _not_ on the heap, as I thought. However, there must be a terminological issue here, because I would describe what alloca does as _dynamic_ stack-resident allocation. It is dynamic because it happens as a result of a run-time call. I understand static to mean an action (allocation, binding, computation, etc.) that is handled entirely at compile and / or link time. >I think, also, the stack probe is automatically called in main, to force >alignment of stack to a page boundary. > >... > >Danny Randall Schulz -- 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/