Author: mmlr Date: 2010-02-07 17:55:43 +0100 (Sun, 07 Feb 2010) New Revision: 35426 Changeset: http://dev.haiku-os.org/changeset/35426/haiku Modified: haiku/trunk/src/system/kernel/heap.cpp haiku/trunk/src/system/libroot/posix/malloc_debug/heap.cpp Log: Must only advance by step sizes, otherwise we may end up with misaligned pages again. Modified: haiku/trunk/src/system/kernel/heap.cpp =================================================================== --- haiku/trunk/src/system/kernel/heap.cpp 2010-02-07 02:11:31 UTC (rev 35425) +++ haiku/trunk/src/system/kernel/heap.cpp 2010-02-07 16:55:43 UTC (rev 35426) @@ -1339,7 +1339,7 @@ for (uint32 j = 1; j < pageCount; j++) { if (area->page_table[i + j].in_use) { first = -1; - i += j; + i += j / step * step; break; } } Modified: haiku/trunk/src/system/libroot/posix/malloc_debug/heap.cpp =================================================================== --- haiku/trunk/src/system/libroot/posix/malloc_debug/heap.cpp 2010-02-07 02:11:31 UTC (rev 35425) +++ haiku/trunk/src/system/libroot/posix/malloc_debug/heap.cpp 2010-02-07 16:55:43 UTC (rev 35426) @@ -947,7 +947,7 @@ for (uint32 j = 1; j < pageCount; j++) { if (area->page_table[i + j].in_use) { first = -1; - i += j; + i += j / step * step; break; } }