summaryrefslogtreecommitdiff
path: root/src/mem_map.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/mem_map.h')
-rw-r--r--src/mem_map.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/mem_map.h b/src/mem_map.h
index c7744bbf3b..1748a0eb67 100644
--- a/src/mem_map.h
+++ b/src/mem_map.h
@@ -72,7 +72,11 @@ class MemMap {
}
byte* End() const {
- return begin_ + size_;
+ return Begin() + Size();
+ }
+
+ bool HasAddress(const void* addr) const {
+ return Begin() <= addr && addr < End();
}
// Trim by unmapping pages at the end of the map.