void tst_FtpWorker::initTestCase(){ th.setStackSize(1000000000); th.start(); th.wait();}
void Thread::run(){ QString l; while (l.length() < 200000000) { l.append("1111111111111"); }}
void tst_FtpWorker::initTestCase(){ QString l; while (l.length() < 200000000) { l.append("1111111111111"); }}
void tst_FtpWorker::initTestCase(){ QSqlDatabase udb; udb = QSqlDatabase::addDatabase( "QODBC", "conn" ); udb.setDatabaseName( "Driver={SQL Server Native Client 10.0};Server=(local);Database=ks;UID=sa;PWD=1;" ); udb.open(); QStringList l; QSqlQuery query( udb ); query.setForwardOnly(true); query.prepare("EXEC dbo.get_initial_data '56FEB471-37A7-494E-AF87-8FC03174C74F'"); query.exec(); while (query.next()) { l.append(query.value(1).toString()); }}
int main(int argc, char *argv[]){ while (1) { // try { // new char; } catch(std::bad_alloc) { // qDebug() << "BAD ALLOC"; break; } } return 0;}
void tst_FtpWorker::initTestCase(){ int i = 250000000; int j = i; while (1) { try { new char[j]; qDebug() << j; j = j + i; } catch(std::bad_alloc) { qDebug() << "BAD ALLOC"; break; } }}
void tst_FtpWorker::initTestCase(){ try { QSqlDatabase udb; udb = QSqlDatabase::addDatabase( "QODBC", "conn" ); udb.setDatabaseName( "Driver={SQL Server Native Client 10.0};Server=(local);Database=ks;UID=sa;PWD=1;" ); udb.open(); QSqlQuery query( udb ); query.setForwardOnly(true); query.prepare("EXEC dbo.get_initial_data '56FEB471-37A7-494E-AF87-8FC03174C74F'"); query.exec(); query.first(); query.value(1); } catch(std::bad_alloc) { qDebug() << "BAD ALLOC"; }}