3 ms·
I was under the impression that fork() basically set up copy-on-write pages for the child process, and thus if it exec()'ed it would lose all those pages anyway
by angersock 12y ago
I was under the impression that fork() basically set up copy-on-write pages for the child process, and thus if it exec()'ed it would lose all those pages anyways and start fresh. Are those VM settings changing that behavior?
- dezgeg 12y agoIt wouldn't affect the copy-on-write optimization or exec(), it just causes fork() to return an error earlier. 'vm.overcommit_memory = 2' attempts to guarantee that after a fork, all of the copy-on-write-pages can still be dirtied (i.e. causing a copy) without the system running out of RAM.