Must only advance by step sizes, otherwise we may end up with misaligned pages

again.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35426 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Michael Lotz 2010-02-07 16:55:43 +00:00
parent b07ef504a0
commit 60fb713d19
2 changed files with 2 additions and 2 deletions

View File

@ -1339,7 +1339,7 @@ heap_allocate_contiguous_pages(heap_allocator *heap, uint32 pageCount,
for (uint32 j = 1; j < pageCount; j++) {
if (area->page_table[i + j].in_use) {
first = -1;
i += j;
i += j / step * step;
break;
}
}

View File

@ -947,7 +947,7 @@ heap_allocate_contiguous_pages(heap_allocator *heap, uint32 pageCount,
for (uint32 j = 1; j < pageCount; j++) {
if (area->page_table[i + j].in_use) {
first = -1;
i += j;
i += j / step * step;
break;
}
}