|
|
|
|
|
by blitzkrieg3
1164 days ago
|
|
This is the only right answer. What actually happens is you instantly have two 10G processes which share the same address space, and: 3. A microsecond later, the child calls exec(), decrementing the reference count to the memory shared with the parent[1] and faulting in a 36k binary, bringing our new total memory usage to 1,045,612KB (1,048,576K + 36K) CoW has existed since at least 1986, when CMU developed the Mach kernel. What GP is really talking about is overcommit, which is a feature (on by default) in Linux which allows you to ask for more memory than you have. This was famously a departure from other Unixes at the time[2], a departure that fueled confusion and countless flame wars in the early Internet. [1] https://unix.stackexchange.com/questions/469328/fork-and-cow...
[2] https://groups.google.com/g/comp.unix.solaris/c/nLWKWW2ODZo/... |
|