I worry a little about having libc use an undocumented mmap(2) flag. About as much as using mquery, which is non-standard.
Maybe __MAP_NOREPLACE should get documentation? __MAP_NOFAULT is in the same situation. The behaviour of these flags should be documented (set in stone), which may also discourage accidental behaviour changes by kernel developers in the future?
