LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (http://www.linuxquestions.org/questions/programming-9/)
-   -   how to count the fault pages and the mapped pages (http://www.linuxquestions.org/questions/programming-9/how-to-count-the-fault-pages-and-the-mapped-pages-183949/)

riquelme 05-20-2004 10:16 PM

how to count the fault pages and the mapped pages
 
I define two static variables in linux\mm.h, fault_pages and mapped_pages to count the fault pages and the mapped pages.

In the function do_mmap() (linu\mm.h), I added a sentence :
mapped_pages+=len;
and in the function do_page_fault() (arch\i386\mm\fault.c) , I added :
fault_pages++;

Can I use this way to count the fault pages and the mapped pages?

I am fresh, and doing some practice of the linux kernel.

Thank you for your help!!!


All times are GMT -5. The time now is 05:46 AM.