Re: fork()

From: Naved A Surve (
Date: 12/19/95

In message <> you said:
> If fork() copies all memory from the parent proces to the child 
> proces how are pointers handled?
> Would they still point to the parents memory?

All modern operating systems use relative addressing, meaning that all
pointer addresses are relative to the start of the virtual address space of
the process.  When you fork, all the virtual addresses in the child are
mapped to new physical addresses.  This is, of course, disregarding
copy-on-write optimizations that might be in place.


This archive was generated by hypermail 2b30 : 12/07/00 PST