Related articles |
---|
[2 earlier articles] |
Re: stack overflow at compile time vb@compilers.de (Volker Barthelmann) (2006-04-27) |
Re: stack overflow at compile time nitin@CoWare.com (Nitin Gupta) (2006-04-27) |
Re: stack overflow at compile time henry@spsystems.net (2006-04-27) |
Re: stack overflow at compile time gah@ugcs.caltech.edu (glen herrmannsfeldt) (2006-04-28) |
Re: stack overflow at compile time jvorbrueggen@mediasec.de (=?ISO-8859-1?Q?Jan_Vorbr=FCggen?=) (2006-04-28) |
Re: stack overflow at compile time jatin.bhateja@conexant.com (Jatin Bhateja) (2006-04-28) |
Re: stack overflow at compile time emailamit@gmail.com (Amit Gupta) (2006-04-29) |
Re: stack overflow at compile time bobduff@shell01.TheWorld.com (Robert A Duff) (2006-04-29) |
Re: stack overflow at compile time emailamit@gmail.com (Amit Gupta) (2006-04-30) |
Re: stack overflow at compile time henry@spsystems.net (2006-04-30) |
Re: stack overflow at compile time henry@spsystems.net (2006-04-30) |
Re: stack overflow at compile time bobduff@shell01.TheWorld.com (Robert A Duff) (2006-05-01) |
Re: stack overflow at compile time gah@ugcs.caltech.edu (glen herrmannsfeldt) (2006-05-03) |
From: | "Amit Gupta" <emailamit@gmail.com> |
Newsgroups: | comp.compilers |
Date: | 29 Apr 2006 15:58:18 -0400 |
Organization: | http://groups.google.com |
References: | 06-04-15706-04-161 06-04-166 |
Keywords: | storage, analysis, comment |
Posted-Date: | 29 Apr 2006 15:58:18 EDT |
Nice discussion and references here. Although think in general case
you cannot get stack size for a generic application (halting problem).
You can get an upper bound and but that is not very useful. Getting a
very tight lower bound approximation is practical only for very
specific applications (as mentioned above)
Some code where level of recursion depends on input parameters will
not give you a tight lower bound. Another way to look at the problem
would be to investigate in self-modifying code. You dont need to
precompute maximum stack size used by the application, but the runtime
system can detct if the stack limit is reached and convert the code to
use hash memory instead of stack memory. One might require a
chckpointing machine in runtime system, so the program can be rolled
back to last know safe stage and modify the piece of code to run on
hash memory. I wonder it is feasible and any research done on this
topic?
-Thanks
Amit
[You can't even get an upper bound in the general case. Imagine a
program that reads in a number and uses that as the number of times to
call itself recursively. -John]
Return to the
comp.compilers page.
Search the
comp.compilers archives again.