Usenet comp.unix.tru64 (2000-2013)
 help / color / mirror / Atom feed
* getrusage returns zeros
@ 2000-09-08  7:20 Harald Finster
  0 siblings, 0 replies; only message in thread
From: Harald Finster @ 2000-09-08  7:20 UTC (permalink / raw)



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 ===

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


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2000-09-08  7:20 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2000-09-08  7:20 getrusage returns zeros Harald Finster

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox