bearophile can say "i told you so" (re uint->int implicit conv)

Jonathan M Davis jmdavisProg at gmx.com
Thu Apr 4 11:16:48 PDT 2013


On Thursday, April 04, 2013 15:20:26 Kagamin wrote:
> I'm afraid, those applications are not tied to 32-bit ints. They
> just want a lot of memory because they have a lot of data. It
> means they want more than 4 gigs, so uint won't help in the
> slightest: it can't address more than 4 gigs, and applications
> will keep failing.

It's a difference of a factor of 2. You can access twice as much memory with a 
uint than an int. It's quite possible to need enough memory that an int 
wouldn't be enough and a uint would be. Of course, going 64-bit pretty much 
solves the problem, because you're not going to have enough memory to need 
anywhere near 64-bits of address space any time soon (and probaly not ever), 
but uint _can_ make a difference or 32-bit machines, because it gives you twice 
as much memory to play around with.

- Jonathan M Davis


More information about the Digitalmars-d mailing list