mmap gives segmentation fault - pls help
Posted on 2010-09-12
i tried a big file and the program gave segmentation fault but when i tried with a smaller file, mmap works fine. i thought that with mmap, the system only loads the required page. so, it is not necessary to have enough memory on the server.
but now, it looks like when i give the length of the file to mmap, it maps that number of bytes. is this true ?
so, if the system doesn't have enough memory, there would be seg fault ??
thanks a million