I am writing a program in which I need to show the user the total virtual memory and the current resident virtual memory for the program itself.
As far as the total virtual memory sysctl seems to do what I need, but it's only working on the 64bit machine I am testing on, not the 32bit one (both running 8.3). On the 32bit machine it returns -1 for total virtual memory. What is happening? Should I be using something other than sysctl?
With regards to resident virtual memory is there a good way to obtain it? I know on OS X, one gets it by calling task_for_pid and extracting it from the task_basic_info they by calling task_info. Is there a similar call for FreeBSD?
Thanks in advance.
Dannenberg
As far as the total virtual memory sysctl seems to do what I need, but it's only working on the 64bit machine I am testing on, not the 32bit one (both running 8.3). On the 32bit machine it returns -1 for total virtual memory. What is happening? Should I be using something other than sysctl?
With regards to resident virtual memory is there a good way to obtain it? I know on OS X, one gets it by calling task_for_pid and extracting it from the task_basic_info they by calling task_info. Is there a similar call for FreeBSD?
Thanks in advance.
Dannenberg