X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fuserprog%2Fpagedir.c;h=820755ff7ce27911fa67e2926409a1e3f9bde507;hb=c12a66d060c18b8fddedff8905d09d7ccd50788c;hp=9b2e3c01af18267dca20dac11df8ecc2f9264c20;hpb=575dc45e34db19ee7808c116e93485b37e0df716;p=pintos-anon diff --git a/src/userprog/pagedir.c b/src/userprog/pagedir.c index 9b2e3c0..820755f 100644 --- a/src/userprog/pagedir.c +++ b/src/userprog/pagedir.c @@ -88,6 +88,8 @@ lookup_page (uint32_t *pd, const void *vaddr, bool create) /* Adds a mapping from user virtual page UPAGE to kernel virtual address KPAGE in page directory PD. UPAGE must not already be mapped. + KPAGE should probably be a page obtained from the user pool + with palloc_get_page(). If WRITABLE is true, the new page is read/write; otherwise it is read-only. Returns true if successful, false if memory allocation