Is there any reasons to not use "mmap" to read files?

rempas rempas at tutanota.com
Sun Feb 6 09:40:48 UTC 2022


This should have probably been posted in the "Learn" section but 
I thought that it is an advanced topic so maybe people other than 
me may learn something too. So here we go!

I'm planning to make a change to my program to use "mmap" to the 
contents of a file rather than "fgetc". This is because I learned 
that "mmap" can do it faster. The thing is, are there any 
problems that can occur when using "mmap"? I need to know now 
because changing this means changing the design of the program 
and this is not something pleasant to do so I want to be sure 
that I won't have to change back in the future (where the project 
will be even bigger).


More information about the Digitalmars-d mailing list