[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [olpc-software] graceful handling of out-of-memory conditions



On Tue, 2006-03-28 at 02:56 +0100, Daniel P. Berrange wrote:

> So while we could put lots of research into figuring out an optimal OOM handling
> solution, I think we'd be better off picking a simple algorithm, and then focusing
> effort on modifying applications  such that in the event they are killed off, no 
> user data is lost. Such modifications would be useful beyond post OOM handling, eg
> post a SEGV crash a user wouldn't loose data. Or it would enable a window manager
> to proactively shutdown apps before an OOM situation is even encountered.
 
As a data point in this discussion, AbiWord has a segfault handler that
saves the current document to disk upon receiving a variety of signals
including 11 of course.

I'll have to look at the code to see if we require memory allocation to
write the data to disk. We probably do. We might be able to save the
situation by releasing memory before writing to disk.

Is it possible to provide a signal to a process upon receiving a an Out
Of Memory rather than just returning a NULL pointer? While returning
NULL pointers will almost certainly cause AbiWord to segfault it would
nicer to know that the segfault was actually an OOM event rather than a
bug in the code. If the former we would know it was appropriate to
delete classes (to release memory) and to give an appropriate document
name, if the latter it make more sense to dump the document as quickly
as possible.

Martin Sevior



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]