Date: Thu, 15 Apr 1999 15:19:45 -0700 (PDT) From: Matthew Dillon <dillon@apollo.backplane.com> To: current@FreeBSD.ORG Subject: Re: RE: swap-related problems Message-ID: <199904152219.PAA48993@apollo.backplane.com> References: <Pine.BSF.3.96.990414035810.4169g-100000@cygnus.rush.net>
next in thread | previous in thread | raw e-mail | index | archive | help
Just a quick note... I've heard 'vfork' and 'fork' mentioned twice now. I think there is some confusion. fork() does not really eat that much memory if all you are doing is fork/exec. The only difference between fork and vfork from a resource point of view is around 32 KBytes of memory and a little extra cpu, and even the memory is recovered when you do the exec. Semantically, they are quite different - vfork is supposed to share the parent process's address space until it exec's whereas fork does not. But FreeBSD's updated VM model, which you can thank John Dyson for mostly, is extremely efficient even when forking whole address spaces. The differences between fork and vfork are also irrelevant in this particular discussion since the fork/exec combination is only in the 'fork' state for a very short time. The moment you exec, the address space is wiped ( except for mmap's MAP_INHERIT, which very few people ever use ). -Matt To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199904152219.PAA48993>