From: Ivan Maidanski Date: Sun, 23 Dec 2012 12:13:45 +0000 (+0400) Subject: Fix dwSize argument of VirtualFree call in detect_GetWriteWatch (Win32) X-Git-Tag: gc7_4_0~102 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=4a271a487d2eea7b19ae9c473fcd2d12e5492b18;p=gc Fix dwSize argument of VirtualFree call in detect_GetWriteWatch (Win32) * 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). --- diff --git a/os_dep.c b/os_dep.c index 12c0485a..17e55820 100644 --- 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;