Date: Wed, 10 Jul 1996 13:34:41 +0200 (IST) From: Eli Zaretskii To: "A.Appleyard" Cc: DJGPP AT delorie DOT com Subject: Re: What if I run out of store In-Reply-To: <1C7D78940A7@fs2.mt.umist.ac.uk> Message-Id: Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII On Wed, 10 Jul 1996, A.Appleyard wrote: > In djgpp version 2, how can I find at run time how much free stack space > is left? You can get the address of the farthest (lowest) location of the stack (by calling `alloca (256K)' at the beginning of `main') and then look at the difference between that value and the addresses of your automatic variables. I didn't test this, though, so I might miss something here.