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:
parent
b07ef504a0
commit
60fb713d19
@ -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;
|
||||
}
|
||||
}
|
||||
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user