1
0
Fork 0
mirror of https://github.com/tailix/kernel.git synced 2024-10-30 12:03:52 -04:00

Fix error

This commit is contained in:
Braiden Vasco 2017-11-05 07:12:04 +00:00
parent 070c386c7d
commit cf1a4931d3

View file

@ -44,9 +44,8 @@ unsigned long memory_alloc_page()
void mark_used(const unsigned long base, const unsigned long limit) void mark_used(const unsigned long base, const unsigned long limit)
{ {
const unsigned int start = base / PAGE_SIZE; const unsigned int start = base / PAGE_SIZE;
const unsigned int end = limit / PAGE_SIZE;
const unsigned int end = limit % PAGE_SIZE ? limit / PAGE_SIZE : limit / PAGE_SIZE + 1;
for (unsigned int i = start; i <= end; ++i) { for (unsigned int i = start; i <= end; ++i) {
frames[i] = 1; frames[i] = 1;