MemoryMappedFile support on Windows
authorNiklas Therning <niklas@therning.org>
Wed, 26 Oct 2016 09:33:50 +0000 (11:33 +0200)
committerNiklas Therning <niklas@therning.org>
Wed, 26 Oct 2016 09:33:50 +0000 (11:33 +0200)
This implements the icalls in file-mmap-windows.c used by MemoryMappedFile.
The implementation has been inspired by the CoreFX MemoryMappedFile
implementation.

This patch also fixes a few incompatibilities between .NET and Mono:

 * The default MemoryMappedFileOptions has been changed from DelayAllocatePages
   to None.
 * mono_pagesize() on Windows now return SYSTEM_INFO.dwPageSize, the same as
   .NET and CoreFX.
 * Added mono_valloc_granule() which returns
   SYSTEM_INFO.dwAllocationGranularity and changed mono-codeman.c to use it
   when trying to allocate adjacent virtual memory.
 * MemoryMappedFileTest has been updated to succeed on .NET.
 * A test has been added to test correct DelayAllocatePages behavior (only
   supported on Mono on Windows, the flag is ignored on other platforms).
 * The posix MemoryMappedFile code has been changed to throw
   UnauthorizedAccessException rather than IOException when trying to create a
   view outside of the bounds of a MemoryMappedFile.
 * Creating a named mapping larger than 4GB on 32-bit systems now throws
   ArgumentOutOfRangeException.


No differences found