On Fri, 2002-05-10 at 00:12, Ahmed Moustafa wrote:
> Thanks a lot. I understand that.
> 
> I was thinking that variable 'x' of a forked process 'p2' would point at 
> the same memory location of variable 'x' of a parent process 'p1'. That 
> can't be true. If that was true, 'p1' and 'p2' would be identitcal (no 
> need to fork!).
> 
> -- 
> Ahmed Moustafa
> http://pobox.com/~amoustafa


N.B. This email is full of unimportant hairsplitting.

In many operating systems fork is implemented using copy-on-write.  This
means that when you fork both processes refer to the same memory
locations until one of them tries to change the bytes stored there.  At
that time the change bytes are copied to a new memory space for the
child.
 
-- 
Today is Setting Orange the 57th day of Discord in the YOLD 3168
Or not.

Missile Address: 33:48:3.521N  84:23:34.786W


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to