mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-01-06 02:55:49 +03: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
Notes:
sideshowbarker
2024-07-19 09:44:49 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/bf5b7c32d84
@ -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…
Reference in New Issue
Block a user