How to handle Out-of-Memory in Konqueror?

Josef Weidendorfer Josef.Weidendorfer at gmx.de
Wed Feb 25 09:44:01 GMT 2004


Hi,

I need your advice. Bug [75775] (konqueror fsview part crashes when viewing a 
large directory) comes from an out of memory condition. The backtrace shows 
that the crash is an abort(), triggered by raising an out-of-memory exception 
in new().

How to cope with this in a graceful way?

Of course, I'm thinking about using less memory resources in fsview (currently 
around 600 Bytes per file). But if someone looks at the root directory of a 
file server, there will always be the possibility for this out-of-memory 
condition.

First thing: I will have to catch the exception? Or is it enough to check for 
zero as return value from new() ?
Next: Does it help in this case to free as many objects as possible before 
showing a notification in message box, or is the process doomed to fail 
anyway?

Josef





More information about the kde-core-devel mailing list