From c907ee755ae8a94bee7f5f8da6c1210a0f1957ca Mon Sep 17 00:00:00 2001 From: Michael Lotz Date: Mon, 27 Dec 2010 02:15:05 +0000 Subject: [PATCH] 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 --- src/system/boot/platform/bios_ia32/mmu.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/system/boot/platform/bios_ia32/mmu.cpp b/src/system/boot/platform/bios_ia32/mmu.cpp index aa25bc1e9a..100c3512e6 100644 --- a/src/system/boot/platform/bios_ia32/mmu.cpp +++ b/src/system/boot/platform/bios_ia32/mmu.cpp @@ -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; }