On Thu, Mar 07, 2002 at 09:42:44AM -0500, cjp wrote:
> This is a comparison of how fast Linux can do something
> STUPID versus how fast a real OS can do something intelligently.  Your
> test is giving you misleading, and dangerous numbers.  Do not go waving them
> around until you have actually looked at mallocs behavior on the different
> systems.
> 
> Here's why:
> 
> Linux implements a brain dead memory allocation
> scheme called memory overcommit.  It will let you malloc
> as much memory as you want whether it is available as RAM or not
> and only bitch when you try to use the memory.  Therefore,
> Linux malloc is much faster than any reasonable system, since all it is doing is
> handing out address space out of unallocated address space,
> not  keeping track of  how much memory there actually is.
> 
> In order to handle the kruft that occurs, there is the out of memory killer,
> oom_killer.
> Which merrily goes through the list of processes, killing off the low priority
> processes
> until enough memory is free to satisfy what was most recently used.  It's the
> loan shark
> repayment program, with OOMKiller performing the function of the deliquency
> reminder.
> 
> On any of the BSD system, you actually get memory you can use, and all the
> overhead
> of assuring its existence at the time of allocation.  Much more robust, less
> prone to abuse.
> 
> Try it, you'll like it.  If you want the nuts and bolts of it, read the source.


Hate to disappoint you, but FreeBSD also overcommits memory.
I believe most (or at least many) other Unix variants (including the
other *BSD systems) also do that.

Whether overcommit is brain-dead or a clever trick is a question which
has been debated several times without any conclusive result.


-- 
<Insert your favourite quote here.>
Erik Trulsson
[EMAIL PROTECTED]

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message

Reply via email to