1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 14:57:35 +00:00

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
parent 27d07796b4
commit d3de138d64

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);