gfortran uses mmap for its IO if an OS has mmap. If found, mmap is used with the MAP_SHARED flag. On linux (and other OS's) this seems to be okay, but on FreeBSD IO can significantly degrade if a file pre-exists. In some testing I've done, linux's MAP_SHARED appears to be equivalent to FreeBSD's (MAP_SHARED | MAP_NOSYNC). I need to add a configure test to determine if MAP_NOSYNC is present. I haven't found an example in the gcc/ directory hierarachy on how this might be accomplished. Any pointers?
-- Steve