Signed word lengths and indexes
bearophile
bearophileHUGS at lycos.com
Wed Jun 16 10:28:37 PDT 2010
Walter Bright:
> If we go back in the thread, the argument for the signed size_t argument was for
> 64 bit address spaces.
I was asking for signed word lengths and indexes on both 32 and 64 bit systems. Sorry for not being more clear from the start.
>With 32 bit address spaces, objects larger than 31 bits are needed.<
I don't fully understand what you mean. On 32 bit systems I can accept arrays and lists and collections (or a call to malloc) with only 2_147_483_648 items/bytes.
On a 32 bit Windows with 3 GB RAM (and Windows itself set to use 3 GB) DMD allows me to allocate only a part of those. In practice you can't allocate more than 2 GB in a single block.
On a 32 bit system I can desire arrays with something like 3_000_000_000 items only when the array items are single bytes (ubyte, char, byte, bool), and such situations are not so common (and probably 32bit Windows will not allow me to do it).
(I am still writing a comment to another answer of yours, I am not so fast, please be patient :-) )
Bye,
bearophile
More information about the Digitalmars-d
mailing list