File mapping provides two major advantages:
ˇShared memory
ˇFaster and easier file access
File mapping allows two or more applications to share memory. Win32-based applications cannot share memory by any other means.
File mapping allows a process to access files more quickly and easily by using a pointer to a file view. Using a pointer improves efficiency because the file resides on disk, but the file view resides in memory. File mapping allows the process to use both random I/O and sequential I/O. It also allows the process to efficiently work with a large data file, such as a database, without having to map the whole file into memory. When the process needs data from a portion of the file other than what is in the current file view, it can unmap the current file view, then create a new file view.