Subject: Re: Replacement for grep(1) (part 2)
To: Jon Ribbens <jon@oaktree.co.uk>
From: Daniel C. Sobral <dcs@newsguy.com>
List: tech-userlevel
Date: 07/13/1999 09:50:21
Jon Ribbens wrote:
> 
> "Daniel C. Sobral" <dcs@newsguy.com> wrote:
> > That's *not* abomination. How about pre-allocating over 100 Mb for X
> > Free, for instance?
> 
> What about it? If an application does not need 100MB, it should not
> malloc it. If it does need it, it should malloc it and know that it
> is available if the malloc succeeds.

Well, learn something about real programs first, and then come back.

> > Basically, if you don't have enough memory, you just don't have enough
> > memory.
> 
> Yes, and the application should be told this via the standard
> documented interface for doing so, i.e. returning NULL from
> malloc().

This results in the applications working with less memory than would
actually be possible through overcommit.

> > What FreeBSD does *reduces* the need for memory. If FreeBSD *did
> > not* do it, then you'd need much more memory.
> 
> Why? Are there really such a lot of applications allocating vastly
> more memory than they actually use?

Right.

--
Daniel C. Sobral			(8-DCS)
dcs@newsguy.com
dcs@freebsd.org

	I'm one of those bad things that happen to good people.