Index: runtime/vm/virtual_memory.cc |
diff --git a/runtime/vm/virtual_memory.cc b/runtime/vm/virtual_memory.cc |
index 8accabdd7630992c7a8abcb974b4e7fb138d0933..4c78c09bad5f3fad0d8654fee959d896bd8dad8b 100644 |
--- a/runtime/vm/virtual_memory.cc |
+++ b/runtime/vm/virtual_memory.cc |
@@ -9,6 +9,12 @@ |
namespace dart { |
+bool VirtualMemory::InSamePage(uword address0, uword address1) { |
+ return (Utils::RoundDown(address0, PageSize()) == |
+ Utils::RoundDown(address1, PageSize())); |
+} |
+ |
+ |
VirtualMemory* VirtualMemory::ReserveAligned(intptr_t size, |
intptr_t alignment) { |
ASSERT((size & (PageSize() - 1)) == 0); |