This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]