Take a look at vm_forkproc in vm_glue.c
-Kip

On 6/8/06, Alexander Leidinger <[EMAIL PROTECTED]> wrote:
Hi,

Roman (and I) need someone who is able to explain fork() and VM stuff.

The problem is that the linux clone() syscall is supposed to do COW of
the stack in some cases (if the child_stack argument is NULL it has to
COW the thread stack, making a copy immediately is maybe ok too as a
workaround). I don't know enough about the VM, so I ask here.

We looked at the code of fork1(), but I can't find a description of
what it is supposed to do and how flags are interpreted. Based upon the
first comment in fork1() it may be able to do it itself. But this
comment may also be completely unrelated to the solution we search.

<bikeshed color="doxygen">It would make sense to have a little bit of
documentation in the vicinity of this function.</bikeshed>

So can someone explain how the stack is copied when calling
fork()/fork1() or whatever_function_foo()?

Bye,
Alexander.

--
Selling GoodYear Eagle F1 235/40ZR18, 2x 4mm + 2x 5mm, ~150 EUR
you have to pick it up between Germany/Saarland and Luxembourg/Capellen
http://www.Leidinger.net    Alexander @ Leidinger.net: PGP ID = B0063FE7
http://www.FreeBSD.org       netchild @ FreeBSD.org  : PGP ID = 72077137
_______________________________________________
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

_______________________________________________
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Reply via email to