diff options
Diffstat (limited to 'winsup/cygwin/mmap.cc')
-rw-r--r-- | winsup/cygwin/mmap.cc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/winsup/cygwin/mmap.cc b/winsup/cygwin/mmap.cc index 53e552368..30410692f 100644 --- a/winsup/cygwin/mmap.cc +++ b/winsup/cygwin/mmap.cc @@ -897,7 +897,9 @@ mmap64 (void *addr, size_t len, int prot, int flags, int fd, _off64_t off) WOW64 does not support the AT_ROUND_TO_PAGE flag which is required to get this right. Too bad. */ if (!wincap.is_wow64 () - && ((len > fsiz && !autogrow (flags)) || len < pagesize)) + && ((len > fsiz && !autogrow (flags)) + || roundup2 (len, getsystempagesize ()) + < roundup2 (len, pagesize))) orig_len = len; if (len > fsiz) { |