This is 2012 update of a 2005 text-oriented implementation lifted from one of my other projects.
For a more recent, C++14 based version, please see github/kfsone/MMapper.
About:
This provides a cross-platform (Win, Lin, Mac) to the MappedFile/mmap system interfaces for low-level memory- based file access.
See mmaptest.cpp for a Linux-based read() vs mmap() comparison.
Also provided is a simple demonstration app which implements a poor-man's grep/find using IO::MappedFile() to search one or more files for a keyword.
I've provided a CMakeLists.txt file for building the example (see Cmake.org).