Re: Detecting endless recursion?

Uli Kusterer <witness@t-online.de>
16 Jan 2004 22:37:15 -0500

          From comp.compilers

Related articles
[2 earlier articles]
Re: Detecting endless recursion? fjh@cs.mu.oz.au (Fergus Henderson) (2004-01-12)
Re: Detecting endless recursion? nmm1@cus.cam.ac.uk (2004-01-16)
Re: Detecting endless recursion? jgd@cix.co.uk (2004-01-16)
Re: Detecting endless recursion? derkgwen@HotPOP.com (Derk Gwen) (2004-01-16)
Re: Detecting endless recursion? torbenm@diku.dk (2004-01-16)
Re: Detecting endless recursion? witness@t-online.de (Uli Kusterer) (2004-01-16)
Re: Detecting endless recursion? witness@t-online.de (Uli Kusterer) (2004-01-16)
Re: Detecting endless recursion? Martin.Ward@durham.ac.uk (Martin Ward) (2004-01-16)
Re: Detecting endless recursion? vbdis@aol.com (2004-01-16)
Re: Detecting endless recursion? joachim.durchholz@web.de (Joachim Durchholz) (2004-01-18)
Re: Detecting endless recursion? nmm1@cus.cam.ac.uk (2004-01-22)
Re: Detecting endless recursion? lex@cc.gatech.edu (Lex Spoon) (2004-01-22)
Re: Detecting endless recursion? torbenm@diku.dk (2004-01-31)
[18 later articles]
| List of all articles for this month |

From: Uli Kusterer <witness@t-online.de>
Newsgroups: comp.compilers
Date: 16 Jan 2004 22:37:15 -0500
Organization: T-Online
References: 04-01-050 04-01-070
Keywords: debug
Posted-Date: 16 Jan 2004 22:37:15 EST

  Fergus Henderson <fjh@cs.mu.oz.au> wrote:


> If you want to base the limit on the amount of memory your system has,
> the GNU libiberty library, which is included with GCC (amongst
> others), defines functions physmem_total() and physmem_available(),
> with platform-specific implementations for a variety of different
> systems.


Thanks! That's what I've been looking for :-) I knew there must be
something like that somewhere.


> See
> <http://savannah.gnu.org/cgi-bin/viewcvs/gcc/gcc/libiberty/physmem.c>.
> Note that if you're going to follow this approach, you should also
> take into account the process resource limits; see the man pages or
> the Posix specification for the getrlimit() function.


  Thanks, will do.


> It depends a lot on your programming style. 100 nesting levels is too
> small for some programs. If you do have a fixed limit, make sure that
> it can be increased without recompiling the program (e.g. allow the
> user to set the limit from an environment variable or command-line
> option).


  I had in mind to allow that, but I wanted to make sure I had a
sensible limit as a default, to avoid people from going in first thing
in the day and upping the limit to something that makes it crash
again, thinking I'd get more power by maxing out all limits... I
certainly would have done that when I started out. ;-)


Cheers and thanks,
-- M. Uli Kusterer
http://www.zathras.de


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.