In map_in_file(), I think, we can take the file size using fstat instead of using the 'numbytes' argument when either initonly or !noinit is true.
Consequently, the code below won't be necessary.
if ( (off_t)sbuf.st_size != (numbytes) ) { std::cerr << filename << " size " << sbuf.st_size << " does not match specified data size of " << (numbytes) << std::endl; return NULL; }
What do you think?