Index: src/platform-win32.cc |
diff --git a/src/platform-win32.cc b/src/platform-win32.cc |
index 87387e7d12246aa2065c8bf35108bcee3dea8633..4b2004a382cfcaae7ca45aec4b5f0b58f5de149f 100644 |
--- a/src/platform-win32.cc |
+++ b/src/platform-win32.cc |
@@ -897,7 +897,7 @@ void OS::ProtectCode(void* address, const size_t size) { |
void OS::Guard(void* address, const size_t size) { |
DWORD oldprotect; |
- VirtualProtect(address, size, PAGE_READONLY | PAGE_GUARD, &oldprotect); |
+ VirtualProtect(address, size, PAGE_NOACCESS, &oldprotect); |
} |
@@ -1473,7 +1473,7 @@ bool VirtualMemory::Guard(void* address) { |
if (NULL == VirtualAlloc(address, |
OS::CommitPageSize(), |
MEM_COMMIT, |
- PAGE_READONLY | PAGE_GUARD)) { |
+ PAGE_NOACCESS)) { |
return false; |
} |
return true; |