From f1488adbf702d0ed3c467eceb082c7172a6972e7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Axel=20D=C3=B6rfler?= Date: Thu, 15 Oct 2009 11:35:31 +0000 Subject: [PATCH] * While r33037 fixed the alignment of areas put into reserved areas, it actually broke their placement at the end of the reserved area, which was the main reason #4778 happened so often (it would have been more hidden else). git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33598 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/system/kernel/vm/vm.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/system/kernel/vm/vm.cpp b/src/system/kernel/vm/vm.cpp index 1cc7ad3de2..4cd735671d 100644 --- a/src/system/kernel/vm/vm.cpp +++ b/src/system/kernel/vm/vm.cpp @@ -1252,10 +1252,13 @@ second_chance: // The new area will be placed at the end of the // reserved area, and the reserved area will be resized // to make space + alignedBase = ROUNDDOWN(next->base + next->size - size, + alignment); + foundSpot = true; next->size = alignedBase - next->base; - last = next; area->base = alignedBase; + last = next; break; }