Index: src/platform-cygwin.cc |
diff --git a/src/platform-cygwin.cc b/src/platform-cygwin.cc |
index 79134da35255b529e95920fc6542116fe9402dba..2dc1ed89db087cc1db5f4eb2f3421fe3d1dc9831 100644 |
--- a/src/platform-cygwin.cc |
+++ b/src/platform-cygwin.cc |
@@ -355,6 +355,17 @@ bool VirtualMemory::Uncommit(void* address, size_t size) { |
} |
+bool VirtualMemory::Guard(void* address) { |
+ if (NULL == VirtualAlloc(address, |
+ OS::CommitPageSize(), |
+ MEM_COMMIT, |
+ PAGE_READONLY | PAGE_GUARD)) { |
Erik Corry
2012/02/23 12:00:40
Can we not map it with no permissions at all, inst
|
+ return false; |
+ } |
+ return true; |
+} |
+ |
+ |
class Thread::PlatformData : public Malloced { |
public: |
PlatformData() : thread_(kNoThread) {} |