mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 06:37:43 +00:00
Kernel: Add sanity check assertion in RangeAllocator::allocate_anywhere
The requested alignment should always be a multiple of the page size.
This commit is contained in:
parent
509e5a3045
commit
27d07796b4
1 changed files with 1 additions and 0 deletions
|
@ -112,6 +112,7 @@ Optional<Range> RangeAllocator::allocate_anywhere(size_t size, size_t alignment)
|
|||
return {};
|
||||
|
||||
ASSERT((size % PAGE_SIZE) == 0);
|
||||
ASSERT((alignment % PAGE_SIZE) == 0);
|
||||
|
||||
#ifdef VM_GUARD_PAGES
|
||||
// NOTE: We pad VM allocations with a guard page on each side.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue