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:
parent
27d07796b4
commit
d3de138d64
1 changed files with 1 additions and 0 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue