Kernel: Fix off by one error when calculating pages in range

This commit is contained in:
Bananymous 2023-09-29 01:56:15 +03:00
parent 58f4ed22c4
commit 5b6569f2c9
1 changed files with 1 additions and 1 deletions

View File

@ -75,7 +75,7 @@ namespace Kernel
{
size_t first_page = start / 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;
}
}