Merge remote-tracking branch 'origin/vm/page-swap-synch' into vm/virtual-memory/saleh

# Conflicts:
#	.gitlab-ci.yml
#	src/Makefile.build
#	src/threads/thread.c
#	src/userprog/exception.c
#	src/userprog/process.c
#	src/vm/frame.c
#	src/vm/page.c
#	src/vm/page.h
#	src/vm/stackgrowth.c
#	src/vm/stackgrowth.h
This commit is contained in:
sBubshait
2024-12-05 02:21:53 +00:00
11 changed files with 222 additions and 58 deletions

View File

@@ -369,6 +369,8 @@ process_exit (void)
/* Clean up all open files */
hash_destroy (&cur->open_files, fd_cleanup);
/* Clean up the thread's supplemental page table. */
hash_destroy (&cur->pages, page_cleanup);
/* Close the executable file, implicitly allowing it to be written to. */
@@ -627,6 +629,9 @@ load (const char *file_name, void (**eip) (void), void **esp)
done:
/* We arrive here whether the load is successful or not. */
#ifndef VM
file_close (file);
#endif
lock_release (&filesys_lock);
return success;
}
@@ -758,6 +763,7 @@ get_usr_kpage (enum palloc_flags flags, void *upage)
return NULL;
else
page = frame_alloc (flags, upage, t);
pagedir_set_accessed (t->pagedir, upage, true);
#else
page = palloc_get_page (flags | PAL_USER);
#endif