From: Ben Pfaff Date: Thu, 9 Sep 2004 22:43:45 +0000 (+0000) Subject: Add comment. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5aa19f8c89021f712c6aa4ea275b2be8c980503c;p=pintos-anon Add comment. --- diff --git a/src/userprog/addrspace.c b/src/userprog/addrspace.c index 6112484..ea8767c 100644 --- a/src/userprog/addrspace.c +++ b/src/userprog/addrspace.c @@ -223,6 +223,12 @@ load_segment (struct thread *t, struct file *file, off_t filesz_left; /* Bytes left of file data (as opposed to zero-initialized bytes). */ + /* Is this a read-only segment? Not currently used, so it's + commented out. You'll want to use it when implementing VM + to decide whether to page the segment from its executable or + from swap. */ + //bool read_only = (phdr->p_flags & PF_W) == 0; + ASSERT (t != NULL); ASSERT (file != NULL); ASSERT (phdr != NULL);