[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[tyndur-devel] [PATCH 2/4] kernel2: Fix fuer find_contiguous_pages
! kernel2: find_contiguous_pages hat freie Pages nur dann gefunden, wenn
in derselben Page Table nicht noch belegte Pages gekommen sind. Wenn
genug freie Pages gefunden sind, einfach aufhoeren.
Signed-off-by: Kevin Wolf <kevin@xxxxxxxxxx>
---
src/kernel2/src/arch/i386/mm/mm_context.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/src/kernel2/src/arch/i386/mm/mm_context.c b/src/kernel2/src/arch/i386/mm/mm_context.c
index 261b8ea..1429769 100644
--- a/src/kernel2/src/arch/i386/mm/mm_context.c
+++ b/src/kernel2/src/arch/i386/mm/mm_context.c
@@ -527,6 +527,9 @@ static vaddr_t find_contiguous_pages
// müssen nochmal bei Null anfangen.
if ((page_table[cur_page++] & PTE_P) == 0) {
free_pages++;
+ if (free_pages >= num) {
+ break;
+ }
} else {
free_pages = 0;
lower_limit = (cur_page_table << PGDIR_SHIFT)
--
1.6.0.2