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

List:       kde-pim
Subject:    Re: [Kde-pim] out of memory
From:       André_Wöbbeking <Woebbeking () onlinehome ! de>
Date:       2005-05-26 16:02:19
Message-ID: 200505261802.19326.Woebbeking () onlinehome ! de
[Download RAW message or body]

On Thursday 26 May 2005 16:02, David Faure wrote:
> 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.

so it's better a application or the whole system crashes instead of an 
error dialog "Sorry, too large document..."?

If the overhead for C++ exceptions is really negligible with newer 
compilers it's probably time to reconsider the decision if exceptions 
should be used or not.


Cheers,
André
_______________________________________________
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