Index: runtime/vm/virtual_memory.h |
=================================================================== |
--- runtime/vm/virtual_memory.h (revision 31654) |
+++ runtime/vm/virtual_memory.h (working copy) |
@@ -41,7 +41,10 @@ |
} |
// Changes the protection of the virtual memory area. |
- bool Protect(Protection mode); |
+ static bool Protect(void* address, intptr_t size, Protection mode); |
+ bool Protect(Protection mode) { |
+ return Protect(address(), size(), mode); |
+ } |
// Reserves a virtual memory segment with size. If a segment of the requested |
// size cannot be allocated NULL is returned. |
@@ -57,6 +60,8 @@ |
return page_size_; |
} |
+ static bool InSamePage(uword address0, uword address1); |
+ |
private: |
// Truncate this virtual memory segment. |
void Truncate(uword new_start, intptr_t size); |