[Interest] 64 bit capable QVector

Thiago Macieira thiago.macieira at intel.com
Wed Sep 4 01:44:57 CEST 2013


On terça-feira, 3 de setembro de 2013 16:16:25, Alex Malyushytskyy wrote:
> Even if simply counting % of software which have to handle data exceeding
> 32 bit limit on the home personal computer you will get higher %.
> Rising of interest in distributed computing including visualization
> probably does not meant to solve problems with low memory requirements.

Even today, software that has a core memory of more than 4 GB (or even 2 GB) 
is an exception, rather than the rule. Please be careful when looking at the 
memory sizes of some process tools, since they do not represent actual memory 
usage.

In any case, we're talking here about having one single container addressing 
more than 2 GB of memory. Because of the implicitly shared & copy-on-write 
nature of the Qt containers, that will probably be highly inefficient. You need 
to be very careful when writing such code to avoid triggering COW and thus 
doubling or worse your memory usage. Also, the Qt containers do not handle OOM 
situations, so if you're anywhere close to your memory limit, Qt containers 
are the wrong tool to use.


The largest process I have on my system is qtcreator and it's also the only 
one that crosses the 4 GB mark in VSZ (4791 MB). You could argue that it is an 
indication that 64-bit containers are required, but you'd be wrong:

* Qt Creator does not have any container requiring 64-bit sizes, it simply 
needs 64-bit pointers

* It is not using 4 GB of memory. That's just VSZ (mapped memory). The total 
RAM currently accessible to Creator is merely 348.7 MB.

* And it is using more than 4 GB of virtual space *because* it is a 64-bit 
application. The cause-and-effect relationship is the opposite of what you'd 
expect. As a proof of this, I checked how much virtual space is consumed by 
padding: 800 MB. A 32-bit application would never do that, that's 19.5% of the 
addressable space on 4 GB.

(padding is virtual space allocated but not backed by anything; it's only 
there so that something else doesn't get mapped to those pages)

-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel Open Source Technology Center
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 190 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20130903/df8c2364/attachment.sig>


More information about the Interest mailing list