Kernel: Add sanity check assertion in RangeAllocator::allocate_specific

The specific virtual address should always be page aligned.
This commit is contained in:
Andreas Kling 2021-01-28 14:51:34 +01:00
commit d3de138d64
Notes: sideshowbarker 2024-07-18 22:47:35 +09:00

View file

@ -155,6 +155,7 @@ Optional<Range> RangeAllocator::allocate_specific(VirtualAddress base, size_t si
if (!size)
return {};
ASSERT(base.is_page_aligned());
ASSERT((size % PAGE_SIZE) == 0);
Range allocated_range(base, size);