Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!wuarchive!waikato.ac.nz!comp.vuw.ac.nz!actrix!templar!jbickers Newsgroups: comp.sys.amiga.programmer Subject: Re: SAS C Stack Question Message-ID: <2373.tnews@templar.actrix.gen.nz> From: jbickers@templar.actrix.gen.nz (John Bickers) Date: Fri, 18 Apr 1991 08:29:14 GMT References: <2858@sirius.ucs.adelaide.edu.au> <1991Apr15.234658.21860@uservx.afwl.af.mil> Organization: TAP, NZAmigaUG. Lines: 21 Quoted from <1991Apr15.234658.21860@uservx.afwl.af.mil> by galetti@uservx.afwl.af.mil: > redundant question, but how do you know how much stack space a particular Estimate. > program needs in SAS C? I just wrote a program that has six 100-element > integer arrays and it bombed with 8000 bytes of stack space. 10,000 bytes 6 * 100 * 4, if you declared these things on the stack. As the programmer, you know how much stack space you use (though variables that will be allocated on the stack, and through function calls (esp. recursion)). I also read somewhere that on top of what you know you'll need, you also need to leave some space for system routines. Something like 2.5K for AmigaDOS library functions. > -Ralph -- *** John Bickers, TAP, NZAmigaUG. jbickers@templar.actrix.gen.nz *** *** "Patterns multiplying, re-direct our view" - Devo. ***