From: Eli Zaretskii Newsgroups: comp.os.msdos.djgpp Subject: Re: question about stack frames Date: Fri, 31 Dec 1999 11:34:28 +0200 Organization: NetVision Israel Lines: 9 Message-ID: <386C78A4.EF5D215A@is.elta.co.il> References: <84frs6$l3h$1 AT nnrp1 DOT deja DOT com> NNTP-Posting-Host: ras1-p113.rvt.netvision.net.il Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: news.netvision.net.il 946632636 19892 62.0.172.115 (31 Dec 1999 09:30:36 GMT) X-Complaints-To: abuse AT netvision DOT net DOT il NNTP-Posting-Date: 31 Dec 1999 09:30:36 GMT X-Mailer: Mozilla 4.7 [en] (Win98; I) X-Accept-Language: en,ru,hebrew To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com deleveld AT my-deja DOT com wrote: > > I am working on a recursive function that has to recursive > quite a few times and I'd like to be able to calculate how many > times the function can recurse without overflowing the stack. You could make this test part of your code, by using the DJGPP library function stackavail. Then you won't need to worry about computing the max recursion level in advance.