lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

> I meant, unless sizeof(size_t)=2.


However, unless I'm misunderstanding something, there's not
much you can do about the original problem, as if size_t is
only 16 bits then you can't grow a table to be more than
64k. There are similar limits for when size_t is 32 bits,
but I don't think many people run into 4 GB tables.

The only solution I see is keeping track of sizes internally
as unsigned longs and, if need be, allocating tables in
multiple chunks. Again, this would only delay the problem
until the size of the table reached ULONG_MAX.


Dr Alan Watson
Instituto de Astronomía UNAM