[Development] QtCore missing check for memory allocation

Oswald Buddenhagen oswald.buddenhagen at theqtcompany.com
Thu Feb 26 20:16:43 CET 2015


On Thu, Feb 26, 2015 at 10:27:05AM -0800, Thiago Macieira wrote:
> On Wednesday 25 February 2015 20:09:21 Oswald Buddenhagen wrote:
> > 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.
> 
> There's no feature on Linux to do that. Overcommit is always enabled.
> 
wrong.
https://www.kernel.org/doc/Documentation/vm/overcommit-accounting

> > also, linux isn't the only os around.
> 
> True, but it's the vast majority of the embedded OSes out there and
> only growing.
> 
given tqtc's strategic interest in the embedded market, a purely
majority-based approach is hardly justifiable.



More information about the Development mailing list