Refactor System Calls and Process for Readability; Change FD to local counter and use it as hash #47
@@ -475,7 +475,7 @@ validate_user_pointer (const void *start, size_t size)
|
||||
|
||||
/* We now need to check if the entire memory block is mapped to physical
|
||||
memory by the page table. */
|
||||
for (const void *ptr = start; ptr <= end; ptr += PGSIZE)
|
||||
for (const void *ptr = pg_round_down (start); ptr <= end; ptr += PGSIZE)
|
||||
if (pagedir_get_page (thread_current ()->pagedir, ptr) == NULL)
|
||||
syscall_exit (EXIT_FAILURE);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user