* mmap.cc (mmap64): Convert pagesize from DWORD to size_t to avoid

a rounding error for allocations beyond 4 Gigs.
This commit is contained in:
Corinna Vinschen 2013-10-15 08:13:42 +00:00
parent a4ec505383
commit 45ec2b422e
2 changed files with 6 additions and 1 deletions

View File

@ -1,3 +1,8 @@
2013-10-15 Corinna Vinschen <corinna@vinschen.de>
* mmap.cc (mmap64): Convert pagesize from DWORD to size_t to avoid
a rounding error for allocations beyond 4 Gigs.
2013-10-05 Christopher Faylor <me.cygwin2013@cgf.cx>
* ntdll.h: Guard against new header files.

View File

@ -901,7 +901,7 @@ mmap64 (void *addr, size_t len, int prot, int flags, int fd, off_t off)
caddr_t base = NULL;
struct stat st;
DWORD pagesize = wincap.allocation_granularity ();
size_t pagesize = wincap.allocation_granularity ();
fh_anonymous.set_io_handle (INVALID_HANDLE_VALUE);
fh_anonymous.set_access (GENERIC_READ | GENERIC_WRITE | GENERIC_EXECUTE);