[Interest] Retrieving the object info due to exception std::bad_alloc
Ramakanth Kesireddy
rama.kesi at gmail.com
Fri Mar 2 04:58:10 CET 2018
Thanks all for your thoughts.
Assuming that it throws bad_alloc exception, I added global replacement of
new operator but it throws linker error of multiple definition of new
operator though it seems to invoke overloaded version of new operator with
filename and line no.Any pointers on how to avoid ld error?
On Thursday, March 1, 2018, Konstantin Tokarev <annulen at yandex.ru> wrote:
>
>
> 01.03.2018, 20:35, "Ramakanth Kesireddy" <rama.kesi at gmail.com>:
>> When system runs on low memory, the object allocations through new in
the Qt application does throw bad_alloc exception,right?
>
> It may or may not throw exception, depending on OS kind, overcommit
settings,
> memory limits set for your application, and your luck.
>
>>
>> On Thursday, March 1, 2018, Thiago Macieira <thiago.macieira at intel.com>
wrote:
>>> On Wednesday, 28 February 2018 15:23:22 PST Konstantin Tokarev wrote:
>>>> bad_alloc is mostly thrown due to too view memory for the request in
>>>> question.
>>>> > so when you continue your program, chances are good to see more
>>>> > bad_allocs.
>>>>
>>>> Or don't get any bad_alloc at all, being killed by OOM Killer promptly
>>>
>>> You get bad_alloc when you make silly requests, like negative sizes or
>>> petabytes.
>>>
>>> --
>>> Thiago Macieira - thiago.macieira (AT) intel.com
>>> Software Architect - Intel Open Source Technology Center
>>>
>>>
>>>
>>> _______________________________________________
>>> Interest mailing list
>>> Interest at qt-project.org
>>> http://lists.qt-project.org/mailman/listinfo/interest
>>> ,
>>
>> _______________________________________________
>> Interest mailing list
>> Interest at qt-project.org
>> http://lists.qt-project.org/mailman/listinfo/interest
>
>
> --
> Regards,
> Konstantin
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20180302/a93c06e1/attachment.html>
More information about the Interest
mailing list