Hello,
the following seems to be a FAQ, but (I have been searching with deja)
a NAQ (Never Answered Question :-)
I try to track down a memory leak problem using 'getrusage',
which seems to be executed correctly (no error returned).
The following sample program:
=== BEGIN testgetrusage.cpp ===
#include <sys/resource.h>
#include <iostream>
int main() {
struct rusage u;
cerr << "rusage-state = " << getrusage ( RUSAGE_SELF, &u) << endl;
cerr << "ru_ixrss = " << u.ru_ixrss << endl;
cerr << "ru_idrss = " << u.ru_idrss << endl;
cerr << "ru_isrss = " << u.ru_isrss << endl;
return 0;
=== END testgetrusage.cpp ===Quote:}
compiled with
cxx testgetrusage.cpp -o testgetrusage
results in the following output:
rusage-state = 0
ru_ixrss = 0
ru_idrss = 0
ru_isrss = 0
Looks like a very efficient (zero memory consuming) program :-)
The OS is Digital UNIX V4.0F (Rev. 1229); Wed Nov 10 10:56:11 GMT 1999
The compiler is Compaq C++ V6.2-024 for Digital UNIX V4.0F (Rev. 1229)
Thanks a lot for any hint
Harald
--
Harald Finster
-
Windoze can be used on the North-Pole without any problems,
... because a frozen computer can't freeze