What are Memory Mapped FIles?

Could anyone please explain what memory mapped files are and why this method is better then reading a file with I/O operations when needed? i've read msdn...wiki...and im still confused at why i cant understand how this works/ what it is doing exactly -thx
I believe memory mapped file means portion of the file are mapped to a memory space. Whenever you do a read/write operation, it is done on that memory space I presume is "protected". Since memory operation are many times faster than file I/O this implies faster efficiency. Once you are ok most likely you will write those mapped memory contents back to the file.

I believe memory mapped files excel for inter-process communications purposes. Process A, B all can take turns read/write to the memory etc. Personally I have not tried memory mapped files API as usually I use fork, pipe the more common API instead.
Topic archived. No new replies allowed.