mirror of
https://github.com/drasko/codezero.git
synced 2026-02-18 12:53:19 +01:00
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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user