diff --git a/Kernel/VM/RangeAllocator.cpp b/Kernel/VM/RangeAllocator.cpp index 475a86d1481..2621f872755 100644 --- a/Kernel/VM/RangeAllocator.cpp +++ b/Kernel/VM/RangeAllocator.cpp @@ -143,7 +143,9 @@ Optional RangeAllocator::allocate_specific(VirtualAddress base, size_t si VERIFY((size % PAGE_SIZE) == 0); Range const allocated_range(base, size); - VERIFY(m_total_range.contains(allocated_range)); + if (!m_total_range.contains(allocated_range)) { + return {}; + } ScopedSpinLock lock(m_lock); for (auto it = m_available_ranges.begin(); !it.is_end(); ++it) {