"The total size of a static array cannot exceed 16Mb."

BCS ao at pathlink.com
Tue Oct 2 00:16:25 PDT 2007


Reply to Vladimir,

> Why?
> 
> I posted a bug report yesterday, thinking it was just some
> accidentally left over code.
> 
> But I noticed this statement in the documentation today. And, frankly,
> I don't understand why that limitation is there.
> 
> The problem with this restriction comes when using multi-dimensional
> arrays. Branched dynamic arrays are MUCH slower than
> rectangular/cubic/etc. static arrays - and this is a severe limitation
> for anyone wanting to work with large amounts of data (e.g. game
> maps). Of course I could work around this by calculating the positions
> manually using x*width+y, but I'd like to know the reason why this
> limitation was put there in the first place, and what's the reasoning
> behind it.

just new the array.





More information about the Digitalmars-d mailing list