qt5base-lts/tests/auto/corelib/tools
João Abecasis fb8be9905d qAllocMore: Always grow exponentially
qAllocMore is used by growing containers to allocate additional memory
for future growth. The previous algorithm would grow linearly in
increments of 8 up to 64 and then progress exponentially in powers of
two.

The new (constant time) algorithm does away with the linear segment and
always progresses exponentially. It also has the nice benefit of cleanly
avoiding undefined behaviour that the old implementation tried hard to
circumvent.

Besides always progressing exponentially, the next-power-of-two
algorithm was tweaked to always include space for growth. Previously
queries at boundary values (powers of two) would return the same value.

The test was updated to verify sanity of results. As the algorithm is
well behaved, testing of bogus data was dropped. Whatever happens in
those cases is irrelevant, anyway: the bug lives elsewhere.

Change-Id: I4def473cce4b438734887084e3c3bd8da0ff466b
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-02-17 21:23:06 +01:00
..
qalgorithms Remove "All rights reserved" line from license headers. 2012-01-30 03:54:59 +01:00
qarraydata Add support for rvalue-references in QArrayDataPointer 2012-02-13 10:40:21 +01:00
qbitarray Remove "All rights reserved" line from license headers. 2012-01-30 03:54:59 +01:00
qbytearray qAllocMore: Always grow exponentially 2012-02-17 21:23:06 +01:00
qbytearraymatcher Remove "All rights reserved" line from license headers. 2012-01-30 03:54:59 +01:00
qcache Remove "All rights reserved" line from license headers. 2012-01-30 03:54:59 +01:00
qchar Remove "All rights reserved" line from license headers. 2012-01-30 03:54:59 +01:00
qcontiguouscache Remove "All rights reserved" line from license headers. 2012-01-30 03:54:59 +01:00
qcryptographichash Remove "All rights reserved" line from license headers. 2012-01-30 03:54:59 +01:00
qdate QDateTime: Remove Julian Calendar 2012-02-05 00:26:07 +01:00
qdatetime QDateTime: Remove Julian Calendar 2012-02-05 00:26:07 +01:00
qeasingcurve Remove "All rights reserved" line from license headers. 2012-01-30 03:54:59 +01:00
qelapsedtimer Remove "All rights reserved" line from license headers. 2012-01-30 03:54:59 +01:00
qexplicitlyshareddatapointer Remove "All rights reserved" line from license headers. 2012-01-30 03:54:59 +01:00
qfreelist Remove "All rights reserved" line from license headers. 2012-01-30 03:54:59 +01:00
qhash Remove "All rights reserved" line from license headers. 2012-01-30 03:54:59 +01:00
qline Remove "All rights reserved" line from license headers. 2012-01-30 03:54:59 +01:00
qlist Remove "All rights reserved" line from license headers. 2012-01-30 03:54:59 +01:00
qlocale SIC: QLocale: Make QSystemLocale a private class 2012-02-05 17:50:04 +01:00
qmap Remove "All rights reserved" line from license headers. 2012-01-30 03:54:59 +01:00
qmargins Remove "All rights reserved" line from license headers. 2012-01-30 03:54:59 +01:00
qpoint Remove "All rights reserved" line from license headers. 2012-01-30 03:54:59 +01:00
qqueue Remove "All rights reserved" line from license headers. 2012-01-30 03:54:59 +01:00
qrect Remove "All rights reserved" line from license headers. 2012-01-30 03:54:59 +01:00
qregexp Remove many deprecated methods 2012-01-31 16:17:55 +01:00
qringbuffer Remove "All rights reserved" line from license headers. 2012-01-30 03:54:59 +01:00
qscopedpointer Remove "All rights reserved" line from license headers. 2012-01-30 03:54:59 +01:00
qscopedvaluerollback Remove "All rights reserved" line from license headers. 2012-01-30 03:54:59 +01:00
qset Remove "All rights reserved" line from license headers. 2012-01-30 03:54:59 +01:00
qsharedpointer Fixed qsharedpointer unittest on windows 2012-02-03 01:40:26 +01:00
qsize Remove "All rights reserved" line from license headers. 2012-01-30 03:54:59 +01:00
qsizef Remove "All rights reserved" line from license headers. 2012-01-30 03:54:59 +01:00
qstl Remove "All rights reserved" line from license headers. 2012-01-30 03:54:59 +01:00
qstring Fix and simplify QString::mid 2012-02-14 12:50:14 +01:00
qstringbuilder Remove "All rights reserved" line from license headers. 2012-01-30 03:54:59 +01:00
qstringlist Remove "All rights reserved" line from license headers. 2012-01-30 03:54:59 +01:00
qstringmatcher Remove "All rights reserved" line from license headers. 2012-01-30 03:54:59 +01:00
qstringref Remove "All rights reserved" line from license headers. 2012-01-30 03:54:59 +01:00
qtextboundaryfinder Remove "All rights reserved" line from license headers. 2012-01-30 03:54:59 +01:00
qtime QDateTime: Add validity checks 2012-01-31 04:18:37 +01:00
qtimeline Remove "All rights reserved" line from license headers. 2012-01-30 03:54:59 +01:00
qvarlengtharray Remove "All rights reserved" line from license headers. 2012-01-30 03:54:59 +01:00
qvector Merge remote-tracking branch 'gerrit/master' into containers 2012-02-05 21:26:33 +01:00
tools.pro Introducing QArrayData 2011-12-06 16:57:17 +01:00