Index: src/platform-cygwin.cc |
diff --git a/src/platform-cygwin.cc b/src/platform-cygwin.cc |
index 5f283c3571510f3ae005e57f29bf170d186ed6d3..85a5e4f610d09c543057a249b4c09a9ac1224027 100644 |
--- a/src/platform-cygwin.cc |
+++ b/src/platform-cygwin.cc |
@@ -166,6 +166,18 @@ void OS::Free(void* address, const size_t size) { |
} |
+void OS::ProtectCode(void* address, const size_t size) { |
+ DWORD old_protect; |
+ VirtualProtect(address, size, PAGE_EXECUTE_READ, &old_protect); |
+} |
+ |
+ |
+void OS::Guard(void* address, const size_t size) { |
+ DWORD oldprotect; |
+ VirtualProtect(address, size, PAGE_READONLY | PAGE_GUARD, &oldprotect); |
+} |
+ |
+ |
void OS::Sleep(int milliseconds) { |
unsigned int ms = static_cast<unsigned int>(milliseconds); |
usleep(1000 * ms); |