On Mon, 27 Sep 1999, M.K.Laha wrote: > If the function takes a sizeable number of seconds to execute, then the > SIZE field from the output of top (as already suggested) may give you an > idea. For this, however, you should have a means of determining exactly > when that particular function starts executing. > > On the other hand, it is always possible to find out how nuch storage is > being declared in the local variables within the function; if any > storage is being dynamically allocated within the function then that has > to be added as well. The space taken up by the code is more difficult to > estimate but if the amount of local data being allocated by the > function, as described above, is fairly large (more than a few > kilobytes), then I have a feeling that should give a good idea of > the total space being used up. > > - Manas Laha. > I'm really grateful to everyone responded. But this program is very big and have numerous functions and for a particular operation there can be many functions being invoked. Hence tracing the SIZE field doesn't give me a very good picture of memory used by the function of my interest. Will it be available anywhere in /proc file system. Atleast, is it possible to find the (stack+data) size allocated for that function. sudheer -------------------------------------------------------------------- For more information on Linux in India visit http://www.linux-india.org/ The Linux India mailing list does not accept postings in HTML format.