memory status system call in neutrino

memory leakage is a big problem in processes that are supposed to run over
long periods of time, especially in distributed applications which are low
in memory. currently i am working on such a remote application which is able
to deliver memory status information back to a central site for monitoring
during the test phase.
i have spend a lot of time to research neutrino’s system library as to
whether it provides a system call that is able to deliver the memory usage
of the (current) process. i assume there must be one which is also used by
the ‘sin’ and ‘pidin’ command to query the OS.

i would greatly appreciate help in this issue,

Josef.

I’ve never used this function but maybe try getrusage(). It fills in a
struct with the following info (copied from helpviewer doc)


struct timeval ru_utime; /* user time used /
struct timeval ru_stime; /
system time used /
long ru_maxrss; /
max resident set size /
long ru_ixrss; /
integral shared memory size /
long ru_idrss; /
integral unshared data " /
long ru_isrss; /
integral unshared stack " /
long ru_minflt; /
page reclaims /
long ru_majflt; /
page faults /
long ru_nswap; /
swaps /
long ru_inblock; /
block input operations /
long ru_oublock; /
block output operations /
long ru_msgsnd; /
messages sent /
long ru_msgrcv; /
messages received /
long ru_nsignals; /
signals received /
long ru_nvcsw; /
voluntary context switches /
long ru_nivcsw; /
involuntary " */

Is this what you were looking for?


Previously, Josef Kriegl wrote in qdn.public.qnxrtp.os:

memory leakage is a big problem in processes that are supposed to run over
long periods of time, especially in distributed applications which are low
in memory. currently i am working on such a remote application which is able
to deliver memory status information back to a central site for monitoring
during the test phase.
i have spend a lot of time to research neutrino’s system library as to
whether it provides a system call that is able to deliver the memory usage
of the (current) process. i assume there must be one which is also used by
the ‘sin’ and ‘pidin’ command to query the OS.

i would greatly appreciate help in this issue,

Josef.