[Qt-interest] QScriptEngine: Could not allocate register file: 12

Pedro Santos nonspam2048 at yahoo.de
Wed May 5 17:21:16 CEST 2010


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



More information about the Qt-interest-old mailing list