Subject: Re: [SG15] Extending p1184 for direct transfer of BMIs
From: David Blaikie (dblaikie_at_[hidden])
Date: 2019-08-11 14:55:00
On Sun, Aug 11, 2019 at 12:51 PM Lyberta via SG15 <sg15_at_[hidden]>
> David Blaikie:
> > My understanding is the OS does this itself - if you memory map a file
> > read-only, it can share memory pages with other processes that are also
> > doing that?
> Ah, so build system memory maps the BMI and then hopes that OS will do
> the right thing? Unfortunately, we can't do that within realm of ISO C++
> yet and I want to keep the build system I'm writing within ISO C++ as
> much as possible (I use Networking TS for sockets).
Oh, no, the build system doesn't do anything here other than tell the
compiler the path to the BMI - the compiler does the memory mapping - given
a path to the BMI, the compiler doesn't read the bytes with a stream - it
memory maps the file directly, so it can lazily load/reference components
of the file. Clang's BMI consists of efficient on-disk hash tables and
things, so only the necessary portions of a BMI are ever read (always room
for improvement, all software has bugs, etc - but that's the general goal).
> SG15 mailing list
SG15 list run by email@example.com