Ask Your Question
4

Does WSL 1 / 2 use copy-on-write when forking?

asked 2021-04-30 11:00:00 +0000

devzero gravatar image

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
2

answered 2023-02-11 05:00:00 +0000

lakamha gravatar image

Yes, WSL 1 and WSL 2 both use copy-on-write when forking. This means that when a new process is created, it shares the memory of the parent process until one of them modifies a page. At that point, a new copy of the page is created for the process that made the modification, while the other process continues to use the original page. This technique helps to conserve memory and improve performance.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss

Add Answer


Question Tools

Stats

Asked: 2021-04-30 11:00:00 +0000

Seen: 7 times

Last updated: Feb 11 '23