why kernel heap and code copied in fork()

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
psnix
Member
Member
Posts: 50
Joined: Fri Oct 24, 2008 12:34 pm

why kernel heap and code copied in fork()

Post by psnix »

in j.m tutorial say we must copy kernel heap and code to the child process:

http://www.jamesmolloy.co.uk/tutorial_h ... sking.html

why we need to copy kernel heap and code to the every child process in fork?
User avatar
NickJohnson
Member
Member
Posts: 1249
Joined: Tue Mar 24, 2009 8:11 pm
Location: Sunnyvale, California

Re: why kernel heap and code copied in fork()

Post by NickJohnson »

You don't want to copy it, but you do want to link it in the same place. I don't see anything in the tutorial about copying the kernel code/data.
Post Reply