Open bovine opened 9 years ago
I haven't looked at the code, but the MAP_FIXED flag to mmap comes to mind. Is that used already?
I had that in the original code.
if(addr == (char *)-1)
addr = 0;
if(addr) flags |= MAP_FIXED;
map = mmap(addr, size, PROT_READ|PROT_WRITE, flags, fd, (off_t) 0);
It now looks like it's calling a BOOST API that may not provide as much control:
...
if (create != 0) { mmf = new managed_mapped_file(open_or_create, file, defaultsize, (void)addr); } else { mmf = new managed_mapped_file(openonly, file, (void)addr); } Need to check what Boost is doing.
On Wed, Jan 7, 2015 at 2:24 AM, Pietro Cerutti notifications@github.com wrote:
I haven't looked at the code, but the MAP_FIXED flag to mmap comes to mind. Is that used already?
— Reply to this email directly or view it on GitHub https://github.com/flightaware/speedtables/issues/46#issuecomment-68991505 .
This might be worked on alongside the fix to issue #38 if boost allows for it.
Karl reports that the base address specified for the memory mapped file may not be actually honored and that a self-assigned address is used instead.