How to handle Out-of-Memory in Konqueror?

Guillaume Laurent glaurent at telegraph-road.org
Wed Feb 25 19:07:22 GMT 2004


On Wednesday 25 February 2004 19:48, Tim Jansen wrote:
> 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...

Yes, absolutely. Although there are different cases, where for instance an 
allocation will fail on a large block but could conceivably succeed on 
smaller ones. In any case, the only reasonable course of action is to exit 
gracefully (which wasn't too clear in the 1st pseudo-code sample I gave).

-- 
						Guillaume.
						http://www.telegraph-road.org




More information about the kde-core-devel mailing list