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:
@@ -1339,7 +1339,7 @@ heap_allocate_contiguous_pages(heap_allocator *heap, uint32 pageCount,
|
|||||||
for (uint32 j = 1; j < pageCount; j++) {
|
for (uint32 j = 1; j < pageCount; j++) {
|
||||||
if (area->page_table[i + j].in_use) {
|
if (area->page_table[i + j].in_use) {
|
||||||
first = -1;
|
first = -1;
|
||||||
i += j;
|
i += j / step * step;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -947,7 +947,7 @@ heap_allocate_contiguous_pages(heap_allocator *heap, uint32 pageCount,
|
|||||||
for (uint32 j = 1; j < pageCount; j++) {
|
for (uint32 j = 1; j < pageCount; j++) {
|
||||||
if (area->page_table[i + j].in_use) {
|
if (area->page_table[i + j].in_use) {
|
||||||
first = -1;
|
first = -1;
|
||||||
i += j;
|
i += j / step * step;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user