Closed qiongsiwu closed 3 months ago
The current text states that
fork gives the new process an exact copy of the calling process's memory, both instruction and data.
fork
A few sentences above, the text states that
An xv6 process consists of user-space memory (instructions, data, and stack) ...
The combination of these two sentences may imply that "stack" is not cloned during fork, and the code https://github.com/mit-pdos/xv6-riscv/blob/f5b93ef12f7159f74f80f94729ee4faabe42c360/kernel/proc.c#L292 implies that we are copying the whole user-space memory, including instructions, data, and stack.
This PR rewords the sentence that describes fork to reduce ambiguity.
Thx! I clarified the text to make clear that the stack is included.
The current text states that
A few sentences above, the text states that
The combination of these two sentences may imply that "stack" is not cloned during
fork
, and the code https://github.com/mit-pdos/xv6-riscv/blob/f5b93ef12f7159f74f80f94729ee4faabe42c360/kernel/proc.c#L292 implies that we are copying the whole user-space memory, including instructions, data, and stack.This PR rewords the sentence that describes fork to reduce ambiguity.