fix: use correct page_get function within page eviction
This commit is contained in:
@@ -96,7 +96,7 @@ frame_alloc (enum palloc_flags flags, void *upage, struct thread *owner)
|
||||
ASSERT (victim != NULL); /* get_victim () should never return null. */
|
||||
|
||||
/* 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 it was a memory-mapped file page, we just write it back
|
||||
|
||||
Reference in New Issue
Block a user