From 4fd6a30d164874fd660aacc36b44842e14bba208 Mon Sep 17 00:00:00 2001 From: manuel Date: Thu, 21 Jun 2012 20:06:48 +0200 Subject: mark pages removed from page/mmap table as clear --- vm/mmap.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'vm/mmap.c') diff --git a/vm/mmap.c b/vm/mmap.c index 0dc9190..8620513 100644 --- a/vm/mmap.c +++ b/vm/mmap.c @@ -1,11 +1,11 @@ #include -#include "userprog/pagedir.h" -#include "userprog/process.h" #include "filesys/file.h" #include "threads/thread.h" #include "threads/vaddr.h" #include "threads/malloc.h" #include "threads/palloc.h" +#include "userprog/pagedir.h" +#include "userprog/process.h" #include "vm/mmap.h" #include "vm/page.h" @@ -128,8 +128,12 @@ mmap_table_remove (struct mmap_table *table, mapid_t mapid) process_unlock_filesys (); } + /* free page and page table entry */ if (pte != NULL) + { + pagedir_clear_page (thread->pagedir, pte->upage); free (pte); + } ofs += PGSIZE; } -- cgit v1.2.3