[Interest] bad_alloc raised : Amout of RAM available ?

qt.dantec at free.fr qt.dantec at free.fr
Mon Jul 8 18:04:06 CEST 2013


On Mon, 08 Jul 2013 08:44:13 -0700, Thiago Macieira
<thiago.macieira at intel.com>  wrote :

>I think new gdbs can break on exceptions thrown, and Creator can make use of 
>that setting. Check the Debugger options.

Yes they do, and QtCreator directly supports it from it's Breakpoint
window.

Unfortunately, I use exceptions extensively in my app, so it is not an
option to catch every exception.

I did find a way, apparently not listed in gdb documentation, to tell
gdb to catch a specific exception : b 'std::bad_alloc::bad_alloc()'

The breakpoint is set, but program does not stop on exception
raised...

Thiago, on the second related matter, is there a way hidden somewhere
in QtCore, that assess how much memory is left available for the
current process ?

Quentin



More information about the Interest mailing list