I need to log the size of physical/virtual memory consumed by any given given process using c/c++ code running on solaris and aix without using the proc filesystem. Please advise.
Write your own kernel modules to duplicate the functionality of the /proc file system?
Because the /proc file system is designed to be the interface used to get such data. It's how utilities like "ps" get data, and even debuggers use the /proc file system as an interface into the processes they're being used to debug.
So you can't even use "ps" or a debugger to get that information without using the /proc file system.