Re: On the issue of low memory situations

From: Nicholas Vinen (hb@sonique.com)
Date: Fri Mar 17 2000 - 12:33:33 EST


On Fri, 17 Mar 2000, Linda Walsh wrote:

> I haven't read through this whole thread, so this may have been
> suggested, but why not have a new signal "SIGNMEM". Can't be caught but
> can be ignored. Default is to take the signal and terminate the program
> that faulted. If ignored, put process to sleep until the memory request
> can be satisfied. Then something like 'X' or apache could ignore, while
> 'gcc' would just die.

   Well, it might even be useful to be able to catch it. Example: 'X' gets
a SIGNMEM. It responds by freeing any memory it might be using for bitmap
caches, font glyph caches, anything unnecessary. When it returns from the
signal, the system then has enough memory free to fulfill the request and
continue the program. 'X' may have also set a flag somewhere when it
caught this signal to tell itself at the first opportunity to shut down
and print "low memory: aborting" if this was a desired behaviour. Better
than a crash huh?
   Overall an excellent suggestion I think.

        -- Nicholas

-
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 : Thu Mar 23 2000 - 21:00:22 EST