1

Is the stack of a forked process shared with its parent?

If so, does this happen via shared copy-on-write pages?

HappyFace
  • 1,493
  • 9
  • 21
  • 2
    [This](https://stackoverflow.com/a/21220399/13998163) might be the answer you need. – vmemmap Apr 24 '22 at 19:40
  • @Roi That does not answer whether the stack is really copied or only shared via copy-on-write pages. The linked “duplicate” question is also about the heap, which I already knew was using the copy-on-write mechanism. – HappyFace Apr 25 '22 at 06:15
  • Virtually not, practically it is CoW-ed on a deeper level (copy-on-write). So the process can see everything as if it would be a fully copied stack. But in practice, no copy happens, only the changed pages will be copied on need. – peterh Apr 25 '22 at 20:24

0 Answers0