summaryrefslogtreecommitdiffstats
path: root/src/corelib/tools/qtools_p.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/corelib/tools/qtools_p.h')
-rw-r--r--src/corelib/tools/qtools_p.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/corelib/tools/qtools_p.h b/src/corelib/tools/qtools_p.h
index 3876d3822c..1e72db1d87 100644
--- a/src/corelib/tools/qtools_p.h
+++ b/src/corelib/tools/qtools_p.h
@@ -46,9 +46,15 @@
//
#include "QtCore/qglobal.h"
+#include <limits>
QT_BEGIN_NAMESPACE
+// We typically need an extra bit for qNextPowerOfTwo when determining the next allocation size.
+enum {
+ MaxAllocSize = (1 << (std::numeric_limits<int>::digits - 1)) - 1
+};
+
// implemented in qbytearray.cpp
int Q_CORE_EXPORT qAllocMore(int alloc, int extra) Q_DECL_NOTHROW;