[H-GEN] Info on Copy on write

Andrae Muys andrae.muys at braintree.com.au
Tue Aug 26 19:46:39 EDT 2003


[ Humbug *General* list - semi-serious discussions about Humbug and     ]
[ Unix-related topics. Posts from non-subscribed addresses will vanish. ]

Harmeet Uppal wrote:
> [ Humbug *General* list - semi-serious discussions about Humbug and     ]
> [ Unix-related topics. Posts from non-subscribed addresses will vanish. ]
> 
> Hi,
> 
> Need some info on how does copy on write work after  a fork and whats is the
> actual difference with vfork and fork.Why is there a difference in their
> foot prints.
> 
vfork(2) is an optimisation of fork(2), really unless you have profiled 
and identified fork as the bottleneck (unlikely) or you are using a unix 
platform that dosn't support fork (yes they do exist, I'm coding for one 
atm), you should ignore vfork and stick with fork.  Other than that I 
can only suggest you read the man pages for the two functions, and 
possibly APUE (which also has a discussion of these two IIRC).

Andrae

-- 
  Andrae Muys    <andrae.muys at braintree.com.au>
  Engineer       Braintree Communications
   "Now, allowing captured continuations to be inspected and altered at
    runtime (including binding mutation, complete rebinding of scopes,
    and call tree mutation)...  *that* is really evil.  And, I should
    point out, quite useful."        - Dan Sugalski



--
* This is list (humbug) general handled by majordomo at lists.humbug.org.au .
* Postings to this list are only accepted from subscribed addresses of
* lists 'general' or 'general-post'.  See http://www.humbug.org.au/



More information about the General mailing list