On Thu, 25 Jul 2013 10:52:43 -0700, kernel neophyte said:

> I am sorry maybe I did not ask the question correctly, all I want to know
> is how mmap works underneath, given an address X how does kernel figure out
> its a mmaped page ?

You missed the point.

The kernel never checks if it's an mmap'ed page.  It merely checks is this
a mapped page, the same way it checks every single other memory reference
whether it's a code segment, your stack, your heap...  it doesn't care
that address 0x3FB0CCF0 is mmap'ed or not.  It just cares "does this throw
a pagefault when I reference it?" - and then it gets handled just like
any other page fault.

Attachment: pgpATpOGMC7qA.pgp
Description: PGP signature

_______________________________________________
Kernelnewbies mailing list
[email protected]
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

Reply via email to