projects
/
pintos-anon
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7dee069
)
Add comment.
author
Ben Pfaff
<blp@cs.stanford.edu>
Thu, 9 Sep 2004 22:43:45 +0000
(22:43 +0000)
committer
Ben Pfaff
<blp@cs.stanford.edu>
Thu, 9 Sep 2004 22:43:45 +0000
(22:43 +0000)
src/userprog/addrspace.c
patch
|
blob
|
history
diff --git
a/src/userprog/addrspace.c
b/src/userprog/addrspace.c
index 6112484f25162a37cb6c38801297fbd0b9c29644..ea8767c84e2f4f33e5bd4e5a1f28f20c59960c62 100644
(file)
--- 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);