Implement VM #63

Merged
td1223 merged 94 commits from vm/merged/themis into master 2024-12-06 05:07:14 +00:00
146 changed files with 15586 additions and 195 deletions
Showing only changes of commit 806d6bc19e - Show all commits

View File

@@ -401,10 +401,6 @@ thread_exit (void)
process_exit (); process_exit ();
#endif #endif
#ifdef VM
mmap_destroy ();
#endif
/* Remove thread from all threads list, set our status to dying, /* Remove thread from all threads list, set our status to dying,
and schedule another process. That process will destroy us and schedule another process. That process will destroy us
when it calls thread_schedule_tail(). */ when it calls thread_schedule_tail(). */

View File

@@ -25,6 +25,7 @@
#include "threads/synch.h" #include "threads/synch.h"
#include "devices/timer.h" #include "devices/timer.h"
#include "vm/page.h" #include "vm/page.h"
#include "vm/mmap.h"
#ifdef VM #ifdef VM
#include "vm/frame.h" #include "vm/frame.h"
#endif #endif
@@ -363,6 +364,9 @@ process_exit (void)
struct thread *cur = thread_current (); struct thread *cur = thread_current ();
uint32_t *pd; uint32_t *pd;
/* Unmap all memory mapped files */
mmap_destroy ();
/* Clean up all open files */ /* Clean up all open files */
hash_destroy (&cur->open_files, fd_cleanup); hash_destroy (&cur->open_files, fd_cleanup);
hash_destroy (&cur->pages, page_cleanup); hash_destroy (&cur->pages, page_cleanup);