Re: [AD] bugfix in floodfill()

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


On Mon, Oct 13, 2003 at 02:30:49PM +0200, Sven Sandberg wrote:
> OK, you are possibly right in that the language can accept arrays so 
> large that they can't be indexed by an int. But on the other hand we use 
> int as array index throughout the library, and I think it's safe to say 
> that most other code in the world does, too. Are you seriously 
> suggesting to check explicitly that an array does not have more than 
> 2,147,483,647 elements??? With 12 bytes per element, we would first have 
> to allocate 6 times more bytes than can be addressed by a 32-bit word, 
> which is absurd (especially since crucial parts of Allegro still assume 
> sizeof(pointer)=sizeof(int)=sizeof(long)>=4).

Out of curiosity, does the language specify a preffered variable type to use
for indexing arrays? If it does, I'd expect that to be an (unsigned ?) int
as well.
For practical purposes, the question is moot. A 32 bit unsigned integer
allows addressing of 4GB, which is the i86 upper limit to addressable memory,
IIRC.

Evert




Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/