Undo the part of r34947 that changed the re-use check. It wasn't broken, since

the address variable is incremented in the loop above and at the end will be
equal to sNextVirtualAddress if the address space can be reused. Fixes early
boot resets due to wrongly reused virtual addresses (and them being freed while
still in use by the original user). Fixes #7026, thanks to Urias for testing.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39961 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Michael Lotz
2010-12-27 02:15:05 +00:00
parent b2acbcbfb3
commit c907ee755a
+1 -1
View File
@@ -474,7 +474,7 @@ mmu_free(void *virtualAddress, size_t size)
address += B_PAGE_SIZE;
}
if (address + size == sNextVirtualAddress) {
if (address == sNextVirtualAddress) {
// we can actually reuse the virtual address space
sNextVirtualAddress -= size;
}