Path: utzoo!utgpu!water!watmath!clyde!att!ihlpl!knudsen From: knudsen@ihlpl.ATT.COM (Knudsen) Newsgroups: comp.lang.c Subject: Re: What goes on stack? Keywords: Local variables Message-ID: <7359@ihlpl.ATT.COM> Date: 24 Oct 88 19:15:46 GMT References: <3221@sdsu.UUCP> Organization: AT&T Bell Laboratories - Naperville, Illinois Lines: 17 [Email failed, so this is posted] All those "dynamic" arrays (known as "automatic" in C-ese and "local" in CS courses) are also allocated on the stack. That's what allows their storage to be freed up when their function returns. However, what will probably help in your case is to put *more* of your data into automatics, not less. You seem to be short on global data space. Be sure to declare global or static only what really needs to be. Of course any automatic variables in main() will persist on the stack thruout the whole execution anyway, so no harm if they're global. -- Mike Knudsen Bell Labs(AT&T) att!ihlpl!knudsen "Lawyers are like handguns and nuclear bombs. Nobody likes them, but the other guy's got one, so I better get one too."