summaryrefslogtreecommitdiff
path: root/Kernel/VM
diff options
context:
space:
mode:
Diffstat (limited to 'Kernel/VM')
-rw-r--r--Kernel/VM/Region.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/Kernel/VM/Region.cpp b/Kernel/VM/Region.cpp
index f26273ea1c..b24101ada1 100644
--- a/Kernel/VM/Region.cpp
+++ b/Kernel/VM/Region.cpp
@@ -49,6 +49,10 @@ Region::Region(const Range& range, NonnullRefPtr<VMObject> vmobject, size_t offs
, m_cacheable(cacheable)
, m_kernel(kernel)
{
+ ASSERT(m_range.base().is_page_aligned());
+ ASSERT(m_range.size());
+ ASSERT((m_range.size() % PAGE_SIZE) == 0);
+
m_vmobject->ref_region();
register_purgeable_page_ranges();
MM.register_region(*this);