aboutsummaryrefslogtreecommitdiff
path: root/winsup/cygwin/mmap.cc
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2003-11-06 14:33:16 +0000
committerCorinna Vinschen <corinna@vinschen.de>2003-11-06 14:33:16 +0000
commit6ef3b76be2d7620e8f495cf5654f0359a1ca178d (patch)
treeb2c9fb10d8dd67809525de91886874d7e615825f /winsup/cygwin/mmap.cc
parentfad5aef8606059f9715e8faac329852ef041f7a6 (diff)
downloadnewlib-6ef3b76be2d7620e8f495cf5654f0359a1ca178d.zip
newlib-6ef3b76be2d7620e8f495cf5654f0359a1ca178d.tar.gz
newlib-6ef3b76be2d7620e8f495cf5654f0359a1ca178d.tar.bz2
* syscalls.cc (getshmlba): New function.
* external.cc (cygwin_internal): Add CW_GET_SHMLBA handling. * mmap.cc (mmap64): Call getshmlba to evaluate granularity. * winsup.h (getshmlba): Add declaration. * include/cygwin/version.h: Bump API minor number. * include/sys/cygwin.h (cygwin_getinfo_types): Add CW_GET_SHMLBA.
Diffstat (limited to 'winsup/cygwin/mmap.cc')
-rw-r--r--winsup/cygwin/mmap.cc8
1 files changed, 1 insertions, 7 deletions
diff --git a/winsup/cygwin/mmap.cc b/winsup/cygwin/mmap.cc
index 7901431..c572b08 100644
--- a/winsup/cygwin/mmap.cc
+++ b/winsup/cygwin/mmap.cc
@@ -455,13 +455,7 @@ mmap64 (void *addr, size_t len, int prot, int flags, int fd, _off64_t off)
syscall_printf ("addr %x, len %u, prot %x, flags %x, fd %d, off %D",
addr, len, prot, flags, fd, off);
- static DWORD granularity;
- if (!granularity)
- {
- SYSTEM_INFO si;
- GetSystemInfo (&si);
- granularity = si.dwAllocationGranularity;
- }
+ static DWORD granularity = getshmlba ();
/* Error conditions according to SUSv2 */
if (off % getpagesize ()