mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-02-05 15:27:04 +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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user