[Qt-interest] QSharedMemory::create takes an int... why?

Thomas Dähling t.daehling at googlemail.com
Fri Jul 31 12:19:39 CEST 2009


Sorry for the double post, but this made me google around a bit, and
after it appears that the size of int is depending upon the compiler
you use. So, to get it to use more than 4 GB you'll have to find a
compiler that takes int as 64 bit.

2009/7/31 Thomas Dähling <t.daehling at googlemail.com>:
> You are also running a 64 Bit OS version? If not, then you get only 32
> bits because the OS (and the dev libs shipped with it) limit you
> there.
>
> 2009/7/31 Patrick Vollebregt <jeet.nl at gmail.com>:
>> Sorry, that's not true.
>>
>> On an AMD64 Linux and int in a GCC compiled program is 32 bits.
>>
>>
>>> As per definition, int is always the width of the cpu register. So on
>>> 64 bit machines an int should be 64 bit, while on 16 bit machines it
>>> should be 16 bit.
>>>
>>> /Thomas
>>>
>>> 2009/7/31 Patrick Vollebregt <jeet.nl at gmail.com>:
>>>
>>>>
>>>> Hi,
>>>>
>>>> Is there a good reason that QSharedMemory::create takes an int?
>>>>
>>>> I need to allocate a block of shared memory with a size over 4GB (on a
>>>> 64bit system), which is not possible with QSharedMemory at the moment.
>>>>
>>>> Kind regards,
>>>>
>>>> Patrick Vollebregt.
>>>>
>>>> _______________________________________________
>>>> Qt-interest mailing list
>>>> Qt-interest at trolltech.com
>>>> http://lists.trolltech.com/mailman/listinfo/qt-interest
>>>>
>>>>
>>
>>
>




More information about the Qt-interest-old mailing list