Re: Overcomittable memory (Was: Linux 2.2.15pre12)

From: bert hubert (ahu@ds9a.nl)
Date: Mon Mar 13 2000 - 18:06:14 EST


On Mon, Mar 13, 2000 at 12:13:37PM +0000, Paul Jakma wrote:

> > P.S. You can all it any way you want but it's sad truth: syslogd, klogd, named
> > and LOTS and LOTS of other daemons will die if malloc will return ENOMEM.
> > Welcome to real world from your ivory tower :-)
>
> then they should be fixed...

Most of the time there is no proper way to deal with OOM. Being really out
of memory probably means that you can't format your error message for
example.

Out of memory *really* means out of memory.

Without reverting to things like exceptions, it's very hard to check for OOM
errors every time you invoke malloc or strdup. Writing a wrapper gives you a
nice message and a cleaner bailout, but does not give you an action that is
proper for your problem.

The code bloat involved in checking each and every function call will also
cause lots of OOMs which otherwise would not have happened :-)

> linux has never been afraid of calling a spade a spade. And it has never
> gone out of its way to support bad apps. If crucial system daemons are
> broken wrt to OOM then they should be fixed, not worked-around.

Being OOM mostly does mean that something is broken.

Regards,

bert hubert.

-- 
                       |              http://www.rent-a-nerd.nl
                       |                  
                       |                     - U N I X -
                       |          Inspice et cautus eris - D11T'95

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Wed Mar 15 2000 - 21:00:26 EST