Operating System - HP-UX
1820553 Members
2339 Online
109626 Solutions
New Discussion юеВ

Re: C code for getting process memory usage

 
SOLVED
Go to solution
Ed Loehr
Advisor

C code for getting process memory usage

I wish to have a piece of C code report how much memory the current process is using. Can anyone give me a pointer to the relevant function? My most recent (failed) attempt is attached, in which the numbers reported by pstat_getprocvm() are difficult to make any sense of, and do not appear to be what I'm looking for.

Ed
2 REPLIES 2
Gregory Kryltsov
Occasional Advisor
Solution

Re: C code for getting process memory usage

Try this one. Worked well for me. See attached shell script for explanation of data.
Ed Loehr
Advisor

Re: C code for getting process memory usage

That's the ticket! Thanks!

Ed