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

List:       kde-devel
Subject:    Re: Exceptions, libraries, gcc and new
From:       Mark Deneen <deneen () gmx ! net>
Date:       2002-10-30 17:48:15
[Download RAW message or body]

Allan Sandfeld Jensen wrote:

>On Wednesday 30 October 2002 15:32, Mark Deneen wrote:
>  
>
>>Kuba Ober wrote:
>>    
>>
>>>[...]
>>>
>>>      
>>>
>>>>>Yes, you're right. I take it, gcc links-in a lib that provides
>>>>>operator new and chooses a different lib depending on whether
>>>>>exceptions are enabled.
>>>>>
>>>>>So, does this in effect mean that one can't *safely* use exceptions
>>>>>in a KDE program because then new might fail within Qt or KDE code
>>>>>in ways that aren't expected there? My understanding is that the
>>>>>only C++ standards-conforming solution would be to replace 'new'
>>>>>with 'new(nothrow)' throughout Qt and KDE.
>>>>>          
>>>>>
>>>That's a beautiful technical discussion and all, but, tell you what:
>>>completely pointless. If operator new fails your system is probably in a
>>>nearly-doomed state... It means that virtual memory has been exhausted,
>>>and most apps are *not* designed to handle that case well, if at all.
>>>And, usually, before the VM is exhausted, the swapping slows everything
>>>to a crawl anyway... Most people reboot before any operator new has a
>>>chance to fail ;-)
>>>
>>>Cheers, Kuba Ober
>>>      
>>>
>>What if the user has a memory usage limit?  The system will still be
>>running fine.
>>
>>    
>>
>Then the platform is HP-UX and almost impossible to get KDE to run on anyway. 
>(I still have nightmares of compiling Qt with a 64Mb memory limit)
>
>What other platforms has this? (openbsd?, some secure linux varient?)
>
I believe solaris has it.  Nothing says that linux will not have it 
sometime in the future, either.

-M

>  
>



 
>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<
[prev in list] [next in list] [prev in thread] [next in thread] 

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