Re: Some questions about linux kernel.

From: Horst von Brand (
Date: Tue Mar 21 2000 - 09:25:58 EST

Brian Hurt <> said:
> One thing I find disturbing about this whole debate is the assumption that
> the only valid response a program can make to running out of memory is to
> crash- and that it doesn't matter if the crash is a SEGV or a more
> controlled cleanup & exit.

Very few programs do controlled cleanup & exit today, those that do will do
so regardless. And if they run OOM (due to overcommitment that can't be
met, user quota, rlimit, system isn't overallocating and ran out, or
whatever), they won't be able to do anything much about it anyway.

> One can even imagine better responses a program might have to being unable
> to allocate memory than simply exit, too- initiating a garbage collection
> to free up it's own internal memory, or having a prepared dialog box that
> it can show that says "Unable to allocate memory- please close some other
> programs and try again".

Where it counts, it will have been implemented. In any case, it will rarely
have any huge impact. Most programs don't use sophisticated data structures,
even less are able to cleanly distinguish between essential and
non-essential (doing so is _much_ extra programmer effort, for no gain when
the resources are available, and little if they aren't (it will mostly mean
memory will definitely run out somewhat later)).

Dr. Horst H. von Brand             
Departamento de Informatica                     Fono: +56 32 654431
Universidad Tecnica Federico Santa Maria              +56 32 654239
Casilla 110-V, Valparaiso, Chile                Fax:  +56 32 797513

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to Please read the FAQ at

This archive was generated by hypermail 2b29 : Thu Mar 23 2000 - 21:00:33 EST