The "too small to fail" memory-allocation rule
The "too small to fail" memory-allocation rule
Posted Dec 24, 2014 9:54 UTC (Wed) by epa (subscriber, #39769)In reply to: The "too small to fail" memory-allocation rule by roc
Parent article: The "too small to fail" memory-allocation rule
Posted Dec 25, 2014 18:44 UTC (Thu)
by quotemstr (subscriber, #45331)
[Link]
vfork does what you want. The "child" shares memory with the parent until it calls exec, so you avoid not only the commit charge catastrophe of copy-on-write fork, but also gain a significant performance boost from not having to copy the page tables.
Posted Dec 25, 2014 22:18 UTC (Thu)
by ldo (guest, #40946)
[Link] (1 responses)
Posted Dec 26, 2014 7:33 UTC (Fri)
by epa (subscriber, #39769)
[Link]
vfork() doesn't make a copy of the address space and so doesn't require either over-caution or over-committing. But it has other limitations.
The "too small to fail" memory-allocation rule
That issue was solved a long time ago, which is why the vfork(2) hack is obsolete nowadays.
Re: shouldn't require a complete copy of the parent process's memory
Re: shouldn't require a complete copy of the parent process's memory