Index: runtime/vm/virtual_memory.h |
=================================================================== |
--- runtime/vm/virtual_memory.h (revision 9969) |
+++ runtime/vm/virtual_memory.h (working copy) |
@@ -13,6 +13,14 @@ |
class VirtualMemory { |
public: |
+ enum Protection { |
+ kNoAccess, |
+ kReadOnly, |
+ kReadWrite, |
+ kReadExecute, |
+ kReadWriteExecute |
+ }; |
+ |
// The reserved memory is unmapped on destruction. |
~VirtualMemory(); |
@@ -32,6 +40,9 @@ |
return Commit(start(), size(), is_executable); |
} |
+ // Changes the protection of the virtual memory area. |
+ bool Protect(Protection mode); |
+ |
// Reserves a virtual memory segment with size. If a segment of the requested |
// size cannot be allocated NULL is returned. |
static VirtualMemory* Reserve(intptr_t size); |