[Interest] 64 bit capable QVector

Thiago Macieira thiago.macieira at intel.com
Wed Sep 4 03:27:16 CEST 2013


On quarta-feira, 4 de setembro de 2013 06:32:54, Syam Krishnan wrote:
> I think the point was that since std::vector is a wrapper around an 
> array, it'd require a *contiguous* block of memory - which might not be 
> available even though there's sufficient RAM. Anyway, you should know 
> your system better.

If you are running a 64-bit application, it's highly unlikely to not find a 
contiguous block of memory available of any size, as long as there is memory 
available to back that memory block. In current hardware.

For example, on x86-64, the processors can do 47 bits of virtual memory[*], 
but the machines can only address 40 bits of real memory. That means there's 
128 times more available virtual space than the largest memory block you could 
allocate.

Other 64-bit architectures are similar, with maybe different number of bits. 
For example, the Intel Itanium 2 has 50 bits of physical memory addressing and 
all 64 bits of virtual memory addressing.

[*] it's actually 48 bits, but bits 47 to 63 must be identical, so the 
addressable memory is actually two very, very far away blocks.

-- 
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/5437524f/attachment.sig>


More information about the Interest mailing list