More updates to vm object handling.

Added a list of links for vm objects so they can follow
the links that point at them.

More succinct handling of the case where a vm object
is dropped. Now depending on the object's number of link
references and shadow references, upon a drop it could
either be merged, deleted or kept.

Added opener reference count for vm files. Now files
have opener count, objects have shadow and link count.
Link count is also meaningful for how many tasks have
mmap'ed that object.
This commit is contained in:
Bahadir Balban
2008-08-29 12:35:07 +03:00
parent 2217349b60
commit 63e9d059c8
7 changed files with 142 additions and 76 deletions

View File

@@ -38,8 +38,8 @@ int copy_vmas(struct tcb *to, struct tcb *from)
/* Create a new link */
new_link = vm_objlink_create();
/* Copy object field from original link. */
new_link->obj = vmo_link->obj;
/* Link object with new link */
vm_link_object(new_link, vmo_link->obj);
/* Add the new link to vma in object order */
list_add_tail(&new_link->list, &new_vma->vm_obj_list);