uint32_t * pagedir_create(void)
Creates a new page directory that has mappings for kernel virtual addresses, but none for user virtua...
void pagedir_set_accessed(uint32_t *pd, const void *upage, bool accessed)
Sets the accessed bit to ACCESSED in the PTE for virtual page VPAGE in PD.
void pagedir_set_dirty(uint32_t *pd, const void *upage, bool dirty)
Set the dirty bit to DIRTY in the PTE for virtual page VPAGE in PD.
bool pagedir_is_accessed(uint32_t *pd, const void *upage)
Returns true if the PTE for virtual page VPAGE in PD has been accessed recently, that is,...
void pagedir_clear_page(uint32_t *pd, void *upage)
Marks user virtual page UPAGE "not present" in page directory PD.
bool pagedir_is_dirty(uint32_t *pd, const void *upage)
Returns true if the PTE for virtual page VPAGE in PD is dirty, that is, if the page has been modified...
void pagedir_destroy(uint32_t *pd)
Destroys page directory PD, freeing all the pages it references.
void pagedir_activate(uint32_t *pd)
userprog/pagedir.h
bool pagedir_set_page(uint32_t *pd, void *upage, void *kpage, bool rw)
Adds a mapping in page directory PD from user virtual page UPAGE to the physical frame identified by ...
void * pagedir_get_page(uint32_t *pd, const void *upage)
Looks up the physical address that corresponds to user virtual address UADDR in PD.