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

H. S. Teoh hsteoh at quickfur.ath.cx
Sun Feb 6 20:12:39 UTC 2022


On Sun, Feb 06, 2022 at 06:47:45PM +0000, rempas via Digitalmars-d wrote:
> On Sunday, 6 February 2022 at 18:33:59 UTC, Temtaime wrote:
> > Windows has its own API to mmap files. There's no need to reinvent
> > the wheel, phobos MmFile works for me without any problems.  Maybe
> > there's no flush function, but for my use cases it's not so
> > critical.
> 
> Yeah, I'm really glad that it works for you but I will have to create
> a library for my compiler so there is a need to properly learn how
> things work so I'll know what I'm doing when the times comes. So
> yeah...

Just read the Phobos source code for std.mmfile. Phobos code is very
readable compared to most typical standard libraries.


T

-- 
Turning your clock 15 minutes ahead won't cure lateness---you're just making time go faster!


More information about the Digitalmars-d mailing list