المساعد الشخصي الرقمي

مشاهدة النسخة كاملة : Memory mapped file I/O Vs Disk I/O



C++ Programming
09-24-2009, 06:11 PM
Hello

Does memory mapped file I/O has a real advantage over disk I/O. Because I am trying to read a file using ::ReadFile API (block by block) and compare it with memory mapped file I/O mechanism from http://www.codeproject.com/KB/files/mmfio.aspx I then tried to compare the time taken to read a file of 700MB using both the techniques. I found that the memory mapped file I/O took almost the same time as disk I/O or sometimes more time.

So, would like to know whether memory mapped file I/O does really provide an advantage over disk I/O and how do I achieve it.

Thanks