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

List:       kde-pim
Subject:    Re: [Kde-pim] out of memory
From:       Don Sanders <sanders () kde ! org>
Date:       2005-05-30 0:49:35
Message-ID: 200505301049.36021.sanders () kde ! org
[Download RAW message or body]

On Friday 27 May 2005 23:44, Ingo Klöcker wrote:
> On Friday 27 May 2005 03:42, Don Sanders wrote:
> > On Friday 27 May 2005 02:02, André Wöbbeking wrote:
> > > 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..."?
> >
> > We had a discussion on the KMail list recently. Where I think we
> > didn't disagree that it would be an ok idea to check that there's
> > enough memory to complete an action before executing it, e.g.
> > fail gracefully and just show a not enough memory dialog if the
> > user tries to attach a 1 gig file to a mail.
>
> This discussion was more about running out of hard disk space than
> running out of memory.

I guess an is there enough memory check could check to ensure 
sufficient hard disk space and main/core memory are free (it's all 
memory). 

Basically an are there enough resources free to complete the requested 
operation approach. Might be useful for preventing some of the most 
common naive/accidental errors. (sending/receiving large or many 
mails).

Mind you the wish for a filter to detach attachments from incoming 
mails could be of practical use also. I guess there is a problem with 
modifying mails causing signatures to become invalid. I'm not sure 
how serious a concern that is.

Don Sanders
_______________________________________________
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