On Wednesday, July 16, 2003 11:58 am -0700 Rich Morin <[EMAIL PROTECTED]> wrote:
At 7:26 AM +0100 7/16/03, David Cantrell wrote:
If you fork() you avoid both that overhead and the overhead of
compiling your code to bytecode.  And while you can't nice a process
that you are forking off, you could do something like system("renice
$niceness -p $$") in the new process.
Interesting.  The fork(2) man page seems to indicate that forking a
process makes a complete copy of it.  Is this actually the case or is
this some sort of lazy (e.g., copy on write) equivalent?

As far as the program is concerned, it's a complete copy. But yes, most modern virtual memory implementations will, I believe, do copy on write. I haven't actually tested this on OS X though :-)


--
David Cantrell

Reply via email to