]> granicus.if.org Git - gc/commitdiff
Fix dwSize argument of VirtualFree call in detect_GetWriteWatch (Win32)
authorIvan Maidanski <ivmai@mail.ru>
Sun, 23 Dec 2012 12:13:45 +0000 (16:13 +0400)
committerIvan Maidanski <ivmai@mail.ru>
Sun, 23 Dec 2012 12:13:45 +0000 (16:13 +0400)
* os_dep.c (detect_GetWriteWatch): Pass 0 (instead of GC_page_size)
to Win32 VirtualFree if GWW_VDB (dwSize must be 0 if MEM_RELEASE
according to MSDN).

os_dep.c

index 12c0485ac80e42aaf69a3ee760fe8073b618b66f..17e55820e7c3dc530ef7e322fbf4b083e81f4baa 100644 (file)
--- a/os_dep.c
+++ b/os_dep.c
@@ -1596,7 +1596,7 @@ void GC_register_data_segments(void)
           } else {
             GetWriteWatch_alloc_flag = MEM_WRITE_WATCH;
           }
-          VirtualFree(page, GC_page_size, MEM_RELEASE);
+          VirtualFree(page, 0 /* dwSize */, MEM_RELEASE);
         } else {
           /* GetWriteWatch will be useless. */
           GetWriteWatch_func = NULL;