vsize from within C++ (UNCLASSIFIED)

Yong Huang yong321 at yahoo.com
Wed Apr 14 18:02:00 UTC 2010


> Is it possible for a process to obtain information about itself 
> (such as that provided by "top"), specifically vsize?

Steve,

I don't know C++. But isn't it a matter of open /proc/$$/stat as a regular file and read the vsize field?

If it's not limited to C++, just type the command:

$ ps -ovsz -p $$
   VSZ
 66228

Yong Huang



      




More information about the redhat-list mailing list