aboutsummaryrefslogtreecommitdiff
path: root/winsup/cygwin/mmap.cc
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2006-07-12 20:15:00 +0000
committerCorinna Vinschen <corinna@vinschen.de>2006-07-12 20:15:00 +0000
commitd44b979536f0e922713ab132a871c062f61ea376 (patch)
tree3cbd9d279765bfac1d833ce83860814f30e3d578 /winsup/cygwin/mmap.cc
parent26339428587309790f56ba4127f9f38166928815 (diff)
downloadnewlib-d44b979536f0e922713ab132a871c062f61ea376.zip
newlib-d44b979536f0e922713ab132a871c062f61ea376.tar.gz
newlib-d44b979536f0e922713ab132a871c062f61ea376.tar.bz2
* mmap.cc (mmap_record::alloc_page_map): Don't call VirtualProtect
on maps created with MAP_NORESERVE.
Diffstat (limited to 'winsup/cygwin/mmap.cc')
-rw-r--r--winsup/cygwin/mmap.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/winsup/cygwin/mmap.cc b/winsup/cygwin/mmap.cc
index cee1a81..7ca176c 100644
--- a/winsup/cygwin/mmap.cc
+++ b/winsup/cygwin/mmap.cc
@@ -574,7 +574,7 @@ mmap_record::alloc_page_map ()
DWORD start_protect = gen_create_protect ();
DWORD real_protect = gen_protect ();
- if (real_protect != start_protect
+ if (real_protect != start_protect && !noreserve ()
&& !VirtualProtect (get_address (), get_len (),
real_protect, &start_protect))
system_printf ("Warning: VirtualProtect (addr: %p, len: 0x%x, "