Determining the memory usage of a program

Steven Hanley sjh at
Tue Feb 12 22:55:27 EST 2002

On Tue, Feb 12, 2002 at 09:19:37PM +1100, Simon Burton wrote:
> >Have I mentioned strace before? :-)
> maybe.
> what has it to do with memory usage?

well it will show up calls to mmap and brk made by the c library, however for
tracking memory usage better ltrace would probably be a better option in this

However strace will show memory exhaustion anyway, and it is one of the best
debuging tools around.

> >Have you had a squiz at the man page for time?? :-)
> I did. it measures time. is yours different?

As has been pointed out in later messages the gnu time command will show qute
a few interesting statistics about memory usage of a process, also useful.

There are other techniues one can turn to, including malloc debugging
libraries and putting other forms of profiling before various library/system
calls in your program.

        See You

sjh at
You are subtle as a window pane standing in my view
but I will wait for it to rain so that I can see you
   Anticipate - Ani

More information about the linux mailing list