Implement VM #63

Merged
td1223 merged 94 commits from vm/merged/themis into master 2024-12-06 05:07:14 +00:00
149 changed files with 15996 additions and 139 deletions
Showing only changes of commit 3897e83963 - Show all commits

View File

@@ -96,7 +96,7 @@ frame_alloc (enum palloc_flags flags, void *upage, struct thread *owner)
ASSERT (victim != NULL); /* get_victim () should never return null. */ ASSERT (victim != NULL); /* get_victim () should never return null. */
/* 2. Handle victim page writing based on its type. */ /* 2. Handle victim page writing based on its type. */
struct page_entry *victim_page = page_get (victim->upage); struct page_entry *victim_page = page_get (thread_current (), victim->upage);
if (victim_page != NULL && victim_page->type == PAGE_MMAP) if (victim_page != NULL && victim_page->type == PAGE_MMAP)
{ {
/* If it was a memory-mapped file page, we just write it back /* If it was a memory-mapped file page, we just write it back