[Interest] 64 bit capable QVector

Syam Krishnan syamcr at gmail.com
Wed Sep 4 03:02:54 CEST 2013


On 09/03/2013 08:04 PM, Michael Jackson wrote:
> On Sep 3, 2013, at 10:23 AM, André Somers <andre at familiesomers.nl> wrote:
>
>> Op 3-9-2013 16:12, Michael Jackson schreef:
>>> I am curious as to what Qt class (if any) folks use for memory allocations larger then 2^31 elements? We write some software that analyzes large scientific data sets and I am trying to figure out if I should stick with std::vector in a few spots or go with something else. We have our own Array class for most of the codes but in a few places we just use a std::vector for convenience. If anyone has any thoughts that would be great to hear those.
>>>
>>> --
>>> Mike Jackson
>>> dream3d.bluequartz.net  (github.com/dream3d/DREAM3D)
>>>
>>> _______________________________________________
>>> Interest mailing list
>>> Interest at qt-project.org
>>> http://lists.qt-project.org/mailman/listinfo/interest
>> I think you should not use vectors for such huge date structures in any
>> case. It is not reasonable to expect that you can even allocate such
>> huge continious blocks of memory I think. When handling so much data, I
>> think you probably need custom data structures too.
>>
>> André
> It is reasonable to expect we can allocate the amounts of RAM that we want to allocate. The machines that run the software should have adequate RAM to do the allocations. We have machines ranging from 16GB min to 32GB standard to a few with 128GB. I was a bit surprised to find that QVector is essentially 32 bit limited. But, as you state, the way we might possibly use it is not within the use case for QVector.

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.

regards,

Syam




More information about the Interest mailing list