memory usage function

Hi all,

I am developing a C++ application on Sun Solaris. Is there any function bundled in the C++ library that can display memory usages of a process? I dont want use command. Many thanks.

Lan

Looking at "man -s4 proc" on Solaris 9, it looks like you can open /proc/self/psinfo and read a psinfo structure. Looks pretty easy, but I have never done it. See that man page for the details.