But I am in a kernel mode. How do I use MMU? And I want to scan the whole pages not just accessing a particular address.
you might want to check vmscan to see how walkthrough of pages are done. i believe what he meant is to walk through/scan the linear/virtual addresses of the pages. that is how you access those pages.
you don't intentionally "use" MMU. the kernel does that for you. you just use the kernel api when necessary.
the size of a x86 page is 4kb. whether it is filled or not, depends on
the type of page it is. if it is a file/device backed page, then it is
usually filled with driver data. if the page is an anonymous page, and you are writing to it, then the page is allocated, zeroed, before it is used/reclaimed to be used.
-- Kernelnewbies: Help each other learn about the Linux kernel. Archive: http://mail.nl.linux.org/kernelnewbies/ FAQ: http://kernelnewbies.org/faq/