From fbcf5f3f925a678c0209b93c0b2a7b2ea9227ee7 Mon Sep 17 00:00:00 2001 From: Michael Lotz Date: Tue, 8 Sep 2009 03:51:17 +0000 Subject: [PATCH] Don't know what this was supposed to do, but with the VADDR_TO_PDENT() it would end up as 0 again in any case. It certainly looks correct without it, removing so it doesn't confuse the next one reading over it. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32994 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/system/kernel/arch/x86/arch_vm_translation_map.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/system/kernel/arch/x86/arch_vm_translation_map.cpp b/src/system/kernel/arch/x86/arch_vm_translation_map.cpp index 59abd88f4c..8a6e77bf30 100644 --- a/src/system/kernel/arch/x86/arch_vm_translation_map.cpp +++ b/src/system/kernel/arch/x86/arch_vm_translation_map.cpp @@ -295,10 +295,9 @@ map_max_pages_need(vm_translation_map */*map*/, addr_t start, addr_t end) { // If start == 0, the actual base address is not yet known to the caller and // we shall assume the worst case. - if (start == 0) { - start = 1023 * B_PAGE_SIZE; + if (start == 0) end += 1023 * B_PAGE_SIZE; - } + return VADDR_TO_PDENT(end) + 1 - VADDR_TO_PDENT(start); }