Memory-Mapped Files Backed by the Paging File
So far, I’ve discussed techniques that allow you to map a view of a file that resides on a disk drive. Many applications create some data while they run and need to transfer the data or share it with another process. It would be terribly inconvenient if the applications had to create a data file on a disk drive and store the data there in order to share it.
Microsoft realized this and added the ability to create memory-mapped files that are backed by the system’s paging file rather than a dedicated hard disk file. This method is almost identical to the method for creating a memory-mapped disk file except that it’s even easier. For one thing, there is no need to call CreateFile
because you will not be ...
Get Windows® via C/C++, Fifth Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.