[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-core-devel
Subject:    Re: How to handle Out-of-Memory in Konqueror?
From:       Tim Jansen <tim () tjansen ! de>
Date:       2004-02-25 18:48:44
Message-ID: 200402251948.44844.tim () tjansen ! de
[Download RAW message or body]

On Wednesday 25 February 2004 18:51, Guillaume Laurent wrote:
> *BUT*, since Qt and KDE are almost always compiled without exception
> support, you can't do the correct thing and you'd have to do the silly
> thing.

Not only because of the lack of exception support. When you got an 
out-of-memory exception and you did not get it while allocating an extremely 
large block, it's likely that whatever you do, you will get another one. 
Almost all non-trivial code allocates memory, you only need to create a 
string...
An OOM handler is extremely hard to write and test, especially when libraries 
don't document which functions can allocate memory. And even if you managed 
to do it correctly, there's no guarantee that the kernel's OOM killer will 
not kill your process without any warning.

bye...




[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic