* mmap.cc (mmap_record::alloc_page_map): Don't call VirtualProtect

on maps created with MAP_NORESERVE.
This commit is contained in:
Corinna Vinschen 2006-07-12 20:15:00 +00:00
parent 2633942858
commit d44b979536
2 changed files with 6 additions and 1 deletions

View File

@ -1,3 +1,8 @@
2006-07-12 Corinna Vinschen <corinna@vinschen.de>
* mmap.cc (mmap_record::alloc_page_map): Don't call VirtualProtect
on maps created with MAP_NORESERVE.
2006-07-12 Corinna Vinschen <corinna@vinschen.de>
* include/pthread.h: Define PTHREAD_PRIO_NONE, PTHREAD_PRIO_INHERIT and

View File

@ -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, "