About the number of copies mmap

Trivial File I / O

First copy: disk-> page cache, (main memory to external memory) from disk to cache pages

Second Copy: page cache-> process heap, the heap page cache to process (i.e., kernel mode to user mode)

 

Memory-mapped files mmap

disk-> page cache, the page cache to disk (external memory to the main memory

Guess you like

Origin www.cnblogs.com/fourstupidguns/p/11072780.html