Re: Wanted: a program that calulates the maximal stack depth

pbk@arkesden.Eng.Sun.COM (Peter B. Kessler)
Fri, 10 Apr 1992 16:53:25 GMT

          From comp.compilers

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)
| List of all articles for this month |

Newsgroups: comp.compilers
From: pbk@arkesden.Eng.Sun.COM (Peter B. Kessler)
Keywords: storage
Organization: Compilers Central
References: 92-04-029
Date: Fri, 10 Apr 1992 16:53:25 GMT

        On unix machines, what about writing your own version of mcount that
keeps track of the maximum stack size. Then compile your program for
profiling (which puts a call to mcount at the top of every procedure, and
uses libraries that similarly call mcount). Depending on how clean you
wanted to be there could be more or less collusion between your mcount
routine and your main program to extract the maximum stack size before
exiting.


        This still only gets you the stack size for the sample runs you make,
not the theoretical limit for your program.


... peter
--


Post a followup to this message

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