* One should not rely on the comma operator being evaluated right-to-left as
it was done in SAS/C... (yeah, that was ages ago). This fixes bug #2030. * Also, we should probably check if the area we're about to shrink/remove actually is a reserved area. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29605 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -1187,8 +1187,12 @@ second_chance:
|
|||||||
// TODO: it would make sense to start with the biggest of them
|
// TODO: it would make sense to start with the biggest of them
|
||||||
next = addressSpace->areas;
|
next = addressSpace->areas;
|
||||||
last = NULL;
|
last = NULL;
|
||||||
for (last = NULL; next; next = next->address_space_next,
|
for (last = NULL; next; next = next->address_space_next) {
|
||||||
last = next) {
|
if (next->id != RESERVED_AREA_ID) {
|
||||||
|
last = next;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
// TODO: take free space after the reserved area into
|
// TODO: take free space after the reserved area into
|
||||||
// account!
|
// account!
|
||||||
if (next->base == ROUNDUP(next->base, alignment)
|
if (next->base == ROUNDUP(next->base, alignment)
|
||||||
@@ -1216,6 +1220,8 @@ second_chance:
|
|||||||
area->base = next->base + next->size;
|
area->base = next->base + next->size;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
last = next;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|||||||
Reference in New Issue
Block a user