[Qt-interest] QScriptEngine: "Could not allocate register file: 12"
Malyushytsky, Alex
alex at wai.com
Wed May 5 20:33:39 CEST 2010
std::bad_alloc exception is thrown in C++ when object can't be allocated?.
Application is terminated when you don't catch exceptions.
This is C++ standard behavior.
-----Original Message-----
From: qt-interest-bounces at trolltech.com [mailto:qt-interest-bounces at trolltech.com] On Behalf Of Pedro Santos
Sent: Wednesday, May 05, 2010 8:23 AM
To: qt-interest at trolltech.com
Subject: [Qt-interest] QScriptEngine: "Could not allocate register file: 12"
It seems that something is wrong with the QScriptEngine the following code
produces a crash with the error:
"Could not allocate register file: 12"
int i = 0;
while(i<600)
{
QScriptEngine *en = new QScriptEngine();
i++;
}
On the other way I tryed the same allocating QStrings. It takes much more
iterations to produce a crash and it cosumes nearly all of my RAM before it
crashes with the error:
"terminate called after throwing an instance of 'std::bad_alloc'
what(): std::bad_alloc"
int i = 0;
while(i<40000000)
{
QString *str = new
QString("fddddddddffffffffffffffffffffffffffffffffffffffffff");
i++;
}
Can someone confirm and explain that behaviaor?
Greetings
Pedro Santos
_______________________________________________
Qt-interest mailing list
Qt-interest at trolltech.com
http://lists.trolltech.com/mailman/listinfo/qt-interest
---------------------------------------------------------------------------------------------------
Weidlinger Associates, Inc. made the following annotations.
“This message and any attachments are solely for the intended recipient and may contain confidential or privileged information. If you are not the intended recipient, any disclosure, copying, use, or distribution of the information included in this message and any attachments is prohibited. If you have received this communication in error, please notify us by reply e-mail and immediately and permanently delete this message and any attachments. Thank you.”
“Please consider our environment before printing this email.”
More information about the Qt-interest-old
mailing list