use of mmaped files
Bud Davis
bdavis@gcc.gnu.org
Fri Aug 20 15:07:00 GMT 2004
gfortran/gcc experts,
i need some help / ideas understanding the details of how this
mechanization is supposed to work.
#1. Don't we want to mmap the entire file when it is opened ? Isn't
the idea that the OS can handle the low level details when the memory is
accessed a lot better than ordinary mortals code? If we do mmap the
whole file, then writing a 2GB array would need 4GB of memory ? (2GB for
the array, 2GB for the mmap)
#2. if we don't mmap the whole thing, one 8K page at a time seems way
to small. how do we pick a size, or determine it dynamically ? If a
size is chosen, how do we keep the edge cases from having horrible
performance ? meaning the program just happens to have an access pattern
that forces chunks to be unmapped and then re-mapped.
all ideas and corrections of my misconceptions are appreciated.
--bud
More information about the Fortran
mailing list