Kernel: Fix off by one error when calculating pages in range
This commit is contained in:
parent
58f4ed22c4
commit
5b6569f2c9
|
@ -75,7 +75,7 @@ namespace Kernel
|
||||||
{
|
{
|
||||||
size_t first_page = start / PAGE_SIZE;
|
size_t first_page = start / PAGE_SIZE;
|
||||||
size_t last_page = BAN::Math::div_round_up<size_t>(start + bytes, PAGE_SIZE);
|
size_t last_page = BAN::Math::div_round_up<size_t>(start + bytes, PAGE_SIZE);
|
||||||
return last_page - first_page + 1;
|
return last_page - first_page;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue