getrusage Questions
6
Solved
I am trying to print a value of type timeval. Actually I am able to print it, but I get the following warning:
Multiple markers at this line
format ‘%ld’ expects type ‘long int’, but argument 2 ...
2
Solved
This is from man getrusage
struct rusage {
struct timeval ru_utime; /* user time used */
struct timeval ru_stime; /* system time used */
long ru_maxrss; /* maximum resident set size */
long ru...
Acromion asked 21/8, 2012 at 8:29
3
Solved
I would like to measure the system time it takes to execute some code. To do this I know I would sandwich said code between two calls to getrusage(), but I get some unexpected results...
#include ...
Whitehall asked 9/5, 2012 at 4:4
1
Solved
This code
void print_usage(char * msg)
{
struct rusage usage;
getrusage(RUSAGE_SELF, &usage);
printf("Limits: %s\n", msg);
printf(" %s, %li\n", " maximum resident set size " , usage.ru_m...
Trophy asked 26/8, 2011 at 14:0
1
© 2022 - 2024 — McMap. All rights reserved.