delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/07/10/06:40:46

Date: Wed, 10 Jul 1996 13:34:41 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
To: "A.Appleyard" <A DOT APPLEYARD AT fs2 DOT mt DOT umist DOT ac DOT uk>
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: <Pine.SUN.3.91.960710132041.4676B-100000@is>
Mime-Version: 1.0

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.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019