[lkml]   [2000]   [Mar]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: Some questions about linux kernel.
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

 \ /
  Last update: 2005-03-22 13:57    [W:0.095 / U:8.628 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site