Small semantical change of map_max_pages_need(): If given a 0 start

address, it is supposed to consider the worst case address range of the
given size.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26740 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Ingo Weinhold 2008-08-02 20:11:11 +00:00
parent eeb8244dc2
commit 802d18a970

View File

@ -328,6 +328,12 @@ put_page_table_entry_in_pgtable(page_table_entry *entry,
static size_t
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;
end += 1023 * B_PAGE_SIZE;
}
return VADDR_TO_PDENT(end) + 1 - VADDR_TO_PDENT(start);
}