3 ms·
It is a weirdly common misconception that that fork() is cheap... it is O(N) on the size of the process, and it always has been. Yes, it's copy on write... but
by jcalvinowens 4mo ago
It is a weirdly common misconception that that fork() is cheap... it is O(N) on the size of the process, and it always has been.
Yes, it's copy on write... but there is a linear relationship between the size of the process and the number of page table entries required to represent it.
- themafia 4mo ago> the number of page table entries This is not exactly fixed since you can vary the amount of memory each page maps with things like hugepages and the same process can run with different page sizes.
- IshKebab 4mo agoYou can in theory, but it's rare in practice because it isn't always enabled and it requires root to configure.