Platform independent memory mapped [file] IO
I've spent some time investigating memory mapped IO for an application I'm working on. I have some very large (TB scale) files, and I want to map segments from them into memory, for both reading and writing, making maximum use of OS-level caching. The software I'm writing needs to work under Unix/Linux and Windows... performance is critical. I've discovered boost::iostreams::mapped_file_source and boost::iostreams::mapped_file_sink , which provide most of the facilities I'm looking for. The facilities I'd like, but haven't found are: Forcing a synchronisation of written data to disk ( msync (2