[Development] QtCore missing check for memory allocation

Konstantin Tokarev annulen at yandex.ru
Thu Feb 26 17:22:56 CET 2015



25.02.2015, 22:09, "Oswald Buddenhagen" <oswald.buddenhagen at theqtcompany.com>:
> On Wed, Feb 25, 2015 at 08:38:21AM -0800, Thiago Macieira wrote:
>>  On Wednesday 25 February 2015 17:20:54 Christian Kandeler wrote:
>>>  Also, you are not even guaranteed to get a null pointer/bad_alloc due to
>>>  things like Linux overcommitting.
>>  Which is one of the reasons why we don't check for malloc failures. Modern
>>  memory allocators with overcommitting and OOM killers mean that it's very hard
>>  to track down actual OOM situations.
>
> exactly because of this, in the embedded world it is common to disable
> overcommit.

When using such a large library as Qt is quite hard to get along with disabled
overcommit on embedded device (because you need to keep your application's VmSize
under than size of physical memory).

-- 
Regards,
Konstantin



More information about the Development mailing list