Implement VM #63
@@ -87,3 +87,21 @@ mmap_cleanup (struct hash_elem *e, void *aux UNUSED)
|
|||||||
file_close (mmap->file);
|
file_close (mmap->file);
|
||||||
free (mmap);
|
free (mmap);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Updates the 'owner' thread's page table entry for virtual address 'upage'
|
||||||
|
to have a present bit of 0 and stores the specified swap slot value in the
|
||||||
|
entry for later retrieval from disk. */
|
||||||
|
void
|
||||||
|
page_set_swap (struct thread *owner, void *upage, size_t swap_slot)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Given that the page with user address 'upage' owned by 'owner' is flagged
|
||||||
|
to be in the swap disk via the owner's page table, returns its stored
|
||||||
|
swap slot. Otherwise panics the kernel. */
|
||||||
|
size_t
|
||||||
|
page_get_swap (struct thread *owner, void *upage)
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user