[Interest] 64 bit capable QVector

Constantin Makshin cmakshin at gmail.com
Tue Sep 3 20:18:39 CEST 2013


Could you please explain (or give a link to an article or something like
that) the reasons Qt developers used to choose signed 32-bit integer for
this purpose?
Signed 32-bit container sizes, i.e. number of elements in a container,
would be acceptable (considering the equation 'n * sizeof(T)' for the
amount of memory consumed by the array alone) but why use them to
calculate and store sizes of allocated memory blocks?

On 09/03/2013 08:42 PM, Thiago Macieira wrote:
> On terça-feira, 3 de setembro de 2013 19:33:47, Mehmet İpek wrote:
>> Btw, size
>> limit of QVector is 2^31 in 64 bit platforms too?
> 
> Yes. All Qt container classes use a signed int for sizes.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: OpenPGP digital signature
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20130903/9d1f829f/attachment.sig>


More information about the Interest mailing list