how to read size of process memory programatically?

Newbie Member
20Feb2010,00:43   #1
douglaskbell's Avatar
I'm tracking a memory leak in a C/C++ program on Solaris.

Is the a function to let a process programatically get its present size of memory usage?
(Like, what gets displayed for 'size' when you run 'top'.)
Ambitious contributor
12Mar2010,02:23   #2
en_7123's Avatar
Quote:
Originally Posted by douglaskbell View Post
I'm tracking a memory leak in a C/C++ program on Solaris.

Is the a function to let a process programatically get its present size of memory usage?
(Like, what gets displayed for 'size' when you run 'top'.)
Yes it is not difficult if I'm understanding it right what you are asking.Could you tell what exactly you want to do.And what is run top ??