From 5aa19f8c89021f712c6aa4ea275b2be8c980503c Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Thu, 9 Sep 2004 22:43:45 +0000 Subject: [PATCH] Add comment. --- src/userprog/addrspace.c | 6 ++++++ 1 file changed, 6 insertions(+) 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); -- 2.30.2