Hi,
I'm trying to get the page faults when I run a program with two different parts.
What I do is some operations using two matrix multiplication methods and try to figure out wich one causes more page faults.
/Operations for method 1
getrusage (RUSAGE_SELF, &usage);
fault1=usage.ru_minflt;
/operations for Method 2
getrusage (RUSAGE_SELF, &usage);
fault2=usage.ru_minflt-fault1;
But seems that fault2=0, what I don't think is correct. If I use two different variables usage and usage2, seems not working neither. Is there any command to start counting the faults for each multiplication method? Am I wrong with the code?
Thanks for the answers