Commit 605bdcd4 authored by Corinna Vinschen's avatar Corinna Vinschen
Browse files

Cygwin: map beyond EOF on 64 bit and WOW64 as well



32 bit Cygwin performs a POSIX-compatible mapping after EOF which
is not supported in this form on Windows.  The 64 bit Windows
kernel never supported the AT_ROUND_TO_PAGE mapping flag, so we
couldn't page-aligned map the space right after the file's EOF.
So mapping beyond EOF was disabled in 64 bit Windows and WOW64.

However,  if mmap works, a matching munmap should work as well,
*and* it should not accidentally unmap unrelated memory.

Therefore we enable mapping beyond EOF on 64 bit as well.  Since
that mapping is always 64K aligned, the are between the last file
page and the next 64K allocation boundary will be unallocated.
There's no way around that.

Signed-off-by: default avatarCorinna Vinschen <corinna@vinschen.de>
parent b0c033bf
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment