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

List:       kde-pim
Subject:    Re: [Kde-pim] out of memory
From:       David Faure <faure () kde ! org>
Date:       2005-05-26 14:02:46
Message-ID: 200505261602.46779.faure () kde ! org
[Download RAW message or body]

On Thursday 26 May 2005 15:32, Mark Bucciarelli wrote:
> In C, I'm used to checking that malloc returns a non-null pointer to 
> make sure you app is not out of memory.
> 
> How do you do this in C++?

This was discussed some time ago, and the consenssus was that in KDE code,
we don't check for out of memory, and we don't need to. The system gets unusable
much before the entire swap is used, and before it gets to that point, the OOM killer
will kill processes as an attempt to recover anyway; and if not, the user will have rebooted
his machine anyway, tired of waiting for the GUI to respond again. So there isn't 
much point in bloating up the code with out-of-memory checks that will never 
happen, or that won't make any difference when they happen.
Programmers of C libs will disagree, because they want to write robust servers etc.,
but in the context of KDE, don't bother with the "out of memory" case.

-- 
David Faure, faure@kde.org, sponsored by Trolltech to work on KDE,
Konqueror (http://www.konqueror.org), and KOffice (http://www.koffice.org).
_______________________________________________
kde-pim mailing list
kde-pim@kde.org
https://mail.kde.org/mailman/listinfo/kde-pim
kde-pim home page at http://pim.kde.org/
[prev in list] [next in list] [prev in thread] [next in thread] 

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