Joel:
As far as I know, standard C libraries do not provide a way to determine this in a portable manner. However, you could write a routine that will handle it on a case per case basis:
For Linux, read /proc/<pid_value>/status and parse it out. Look for the Vm lines. Memory usage is a rather philosophical issue - there are several ways to define it.
I do not know without further research how to do it on OS X, but I would download the sources of ps and examine them to find out.
-- Sasha Pachev Create online surveys at http://www.surveyz.com/
____________________
BYU Unix Users Group http://uug.byu.edu/ ___________________________________________________________________
List Info: http://uug.byu.edu/cgi-bin/mailman/listinfo/uug-list
