Brought mm0 initialization up to init_execve()

Changes:
It is now possible to use do_mmap() from within mm0.

- pager_new_virtual()/delete_virtual() return addresses that are
  disjoint from find_unmapped_area() used by mmap() interface for
  anonymous or not-fixed areas.
- find_unmapped_area() now uses task->map_start task->map_end instead
  of task->start and task->end. task->start/end are still valid task
  space addresses for mmap(), but finding a new address is limited to
  map_start/map_end.

- We have both interfaces because mmap() is only useful for backed-files.
  When the pager needs to access a user memory range for example, that is
  not backed by a file and thus we need to use pager_new_virtual() instead
  of mmap() for mapping.
This commit is contained in:
Bahadir Balban
2009-10-06 14:15:33 +03:00
parent 56ceed0786
commit 965f2f9456
11 changed files with 101 additions and 36 deletions
+1 -1
View File
@@ -63,7 +63,7 @@ void print_cache_pages(struct vm_object *vmo)
printf("Pages:\n======\n");
list_foreach_struct(p, &vmo->page_cache, list) {
dprintf("Page offset: 0x%x, virtual: 0x%x, refcnt: %d\n", p->offset,
dprintf("Page offset: 0x%lx, virtual: 0x%lx, refcnt: %d\n", p->offset,
p->virtual, p->refcnt);
}
}