- 
    Bug 
- 
    Resolution: Done
- 
    P3: Somewhat important 
- 
    5.12.3
- 
    None
- 
        
- 
        b321559a22a3ee6490695ecb9d95d3c9fbf7ee1c
The following code
#include <QByteArray>
 #include <QDebug>
int main(int argc, char *argv[])
{ QByteArray ba; ba.resize(std::numeric_limits<int>::max()); qDebug() << ba.size(); }
crashes with
terminate called after throwing an instance of 'std::bad_alloc'
 what(): std::bad_alloc
I've been told "it is known" that the max size QByteArray can hold is 2^31 but i can't find anything in the documentation.
It would be nice if one could have a QByteArray::maxsize or something that could be used for that.
| For Gerrit Dashboard: QTBUG-75470 | ||||||
|---|---|---|---|---|---|---|
| # | Subject | Branch | Project | Status | CR | V | 
| 260072,3 | Document OOM conditions in the QArrayData-based containers | 5.13 | qt/qtbase | Status: MERGED | +2 | 0 |