From 1a053eedc0801705aff5e53c01ddb571f035c672 Mon Sep 17 00:00:00 2001 From: Michael Lotz Date: Tue, 8 Sep 2009 16:24:43 +0000 Subject: [PATCH] Revert r32994 and add a comment to explain the intention. Thanks Ingo for the clarification. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33001 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/system/kernel/arch/x86/arch_vm_translation_map.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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 8a6e77bf30..4e027d5b3f 100644 --- a/src/system/kernel/arch/x86/arch_vm_translation_map.cpp +++ b/src/system/kernel/arch/x86/arch_vm_translation_map.cpp @@ -295,8 +295,11 @@ 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) + if (start == 0) { + // offset the range so it has the worst possible alignment + start = 1023 * B_PAGE_SIZE; end += 1023 * B_PAGE_SIZE; + } return VADDR_TO_PDENT(end) + 1 - VADDR_TO_PDENT(start); }