As the title says. Previously the MapFileView function did not take into account the handle argument, as it used the MAP_ANONYMOUS and the MAP_PRIVATE flags.
Additionally, AllocFixed used mmap and DeallocFixed used munmap always, with the MAP_FIXED flag. This was not ideal for several reasons:
Invoking mmap the way it was invoked silently unmaps the range from the file it was previously mapped to.
MAP_FIXED was used even with a nullptr base_address.
Mapped file memory should not be unmapped in DeallocFixed.
As the title says. Previously the MapFileView function did not take into account the handle argument, as it used the MAP_ANONYMOUS and the MAP_PRIVATE flags.
Additionally, AllocFixed used mmap and DeallocFixed used munmap always, with the MAP_FIXED flag. This was not ideal for several reasons:
For more information regarding mmap, see: https://man7.org/linux/man-pages/man2/mmap.2.html