[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [MiNT] Dangerous assumption in MINT lib



Joerg_Westheide@su.maus.de (Jörg Westheide) writes:

|> Can anyone tell me something about the use of vfork()?

vfork is a cheap version of fork.  It does not copy the address space,
instead it is shared by the parent and the child.  To make this work the
parent must not run at the same time as the child, so it is blocked (in
the kernel) until the child calls _exit() or execve() (Pterm/Pexec in MiNT
speak).  In the old days, were mem were men, err, were there was no
paging, but only swapping this was a big difference for a program that
just wants to spawn another one.  Even nowadays, on systems that do no
memory overcommitment, this is still a good thing, to avoid having to
reserve swap space just to discard it again a moment later, especially for
a big processes.

-- 
Andreas Schwab                                      "And now for something
schwab@issan.cs.uni-dortmund.de                      completely different"
schwab@gnu.org