Re: Detecting endless recursion?

Joachim Durchholz <joachim.durchholz@web.de>
18 Jan 2004 20:53:54 -0500

          From comp.compilers

Related articles
[5 earlier articles]
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)
Re: Detecting endless recursion? witness@t-online.de (Uli Kusterer) (2004-01-31)
Re: Detecting endless recursion? witness@t-online.de (Uli Kusterer) (2004-02-01)
Re: Detecting endless recursion? witness@t-online.de (Uli Kusterer) (2004-02-01)
[15 later articles]
| List of all articles for this month |

From: Joachim Durchholz <joachim.durchholz@web.de>
Newsgroups: comp.compilers
Date: 18 Jan 2004 20:53:54 -0500
Organization: Oberberg Online Infosysteme
References: 04-01-050 04-01-086
Keywords: debug
Posted-Date: 18 Jan 2004 20:53:54 EST

Torben Ęgidius Mogensen wrote:


>> my app just bombs because it runs out of memory (because my fake
>>stack keeps growing and growing). And the OS doesn't let me know it's
>>out of memory because it's happily paging out VM.
>
> It sounds like you are not implementing tail calls properly.


Since the tool is going to be educational, I assume that the users
will be able to halt the execution and inspect the stack state. In
this situation, tail call optimization is something that should not be
done: the users will complain that the tool has removed information
(all those intermediate stack frames that got eliminated due to tail
call optimization).


Of course, having tail call optimization would be a worthwhile option
to teach about that optimization itself, and to give the students the
possibility to run this kind of recursion without running out of stack
space :-)


I have implemented such an interpreter myself, though that
optimization never got beyond the discussion stage (we were happy to
get the entire system up and running within the allotted time, and
even more happy to see it in actual use *g*).


Regards,
Jo
--
Currently looking for a new job.


Post a followup to this message

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