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; }