This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
rusage overflow
- From: Andreas Beyer <beyer at imb-jena dot de>
- To: gcc-help at gcc dot gnu dot org
- Date: Fri, 09 May 2003 11:06:32 +0200
- Subject: rusage overflow
Hi,
I am using getrusage() to get some information on the memory usage of my
program. Occasionally the values in the rusage structure become larger
than the maximum long int (i.e. I get negative values).
Interpreting the overflowed long int values as positive values should
give the correct number if memory usage is estimated by additive operations.
Is it safe to interpret the long int entries in the rusage structure as
unsigned long int?
Thanks,
Andreas