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:
parent
eeb8244dc2
commit
802d18a970
@ -328,6 +328,12 @@ put_page_table_entry_in_pgtable(page_table_entry *entry,
|
|||||||
static size_t
|
static size_t
|
||||||
map_max_pages_need(vm_translation_map */*map*/, addr_t start, addr_t end)
|
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);
|
return VADDR_TO_PDENT(end) + 1 - VADDR_TO_PDENT(start);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user