mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 15:57:45 +00:00
Kernel: Add some sanity assertions in RangeAllocator::deallocate()
We should never end up deallocating an empty range, or a range that ends before it begins.
This commit is contained in:
parent
31a141bd10
commit
bf5b7c32d8
1 changed files with 2 additions and 0 deletions
|
@ -151,6 +151,8 @@ Range RangeAllocator::allocate_specific(VirtualAddress base, size_t size)
|
|||
void RangeAllocator::deallocate(Range range)
|
||||
{
|
||||
ASSERT(m_total_range.contains(range));
|
||||
ASSERT(range.size());
|
||||
ASSERT(range.base() < range.end());
|
||||
|
||||
#ifdef VRA_DEBUG
|
||||
dbgprintf("VRA: Deallocate: %x(%u)\n", range.base().get(), range.size());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue