I am using Win 7 64 bit with 12 GB RAM.
I want to allocate a QVector<double> of length 714838*256 by:
Qt Code:
  1. QVector<double> *qwert = new QVector<double>(714838*256);
To copy to clipboard, switch view to plain text mode 
but I get a bad_alloc() exception. So I tried it with just:
Qt Code:
  1. double * qwert = new double[714838 * 256];
To copy to clipboard, switch view to plain text mode 
And I still get an error. After a few trials I found that I can allocate 178077685 doubles but not 178077686. But,
Qt Code:
  1. QVector<double> *qwert = new QVector<double>(178077685);
To copy to clipboard, switch view to plain text mode 
still throws the same exception. I show this to be ~1.32 GB of doubles wihich is << 12 GB or RAM available.
I've looked all day online to find a reason why I cannot allocate a double array any larger and the only explanation I can find is a RAM limitation, which is not the case here.