Related articles |
---|
Wanted: a program that calulates the maximal stack depth samuel@nada.kth.se (1992-04-06) |
Re: Wanted: a program that calulates the maximal stack depth russw@cs.utexas.edu (1992-04-09) |
Re: Wanted: a program that calulates the maximal stack depth bliss@sp64.csrd.uiuc.edu (1992-04-09) |
Re: Wanted: a program that calulates the maximal stack depth hays@ssd.intel.com (1992-04-09) |
Re: Wanted: a program that calulates the maximal stack depth pbk@arkesden.Eng.Sun.COM (1992-04-10) |
Re: Wanted: a program that calulates the maximal stack depth eifrig@beanworld.cs.jhu.edu (1992-04-10) |
Re: Wanted: a program that calulates the maximal stack depth samuel@nada.kth.se (1992-04-11) |
Newsgroups: | comp.compilers |
From: | russw@cs.utexas.edu (Russ Williams) |
Keywords: | storage |
Organization: | Great Northern Hotel |
References: | 92-04-029 |
Date: | Thu, 9 Apr 1992 02:36:08 GMT |
samuel writes:
> I'm developing an application where the use of stack space is crucial.
I can't help about getting exact stack usage for each function, but
I recently read a clever idea to empirically compute the stack space
used by the entire program: Add some (machine/language specific)
initialization code at start of your program to initialize all of
stack space with a random magic constant, then at end of program
look at stack space and see how far up it got overwritten. This
isn't exact, of course, but may be good enough.
Russ
russw@cs.utexas.edu
--
Return to the
comp.compilers page.
Search the
comp.compilers archives again.