4 ms·
Or if your FS is slightly corrupted and figures out quite late it does not know where part of the file is. Or if you suddenly loose access to the hard drive. I
by temac 7y ago
Or if your FS is slightly corrupted and figures out quite late it does not know where part of the file is. Or if you suddenly loose access to the hard drive.
If you write your program carefully, you can handle it, but it is way more difficult than handling error codes returned by a read function. You will even have to fight the compiler, because it does not distinguish between RW on manually mmapped data files from other RW; however you may want to just let it crash, because after all your program is also mmapped, including .text and .rodata sections, so it better works correctly -- anyway if the data files are on another partition and/or the application requires to be resilient, this excuse does not hold.