Why 16Mib static array size limit?

Ali Çehreli via Digitalmars-d digitalmars-d at puremagic.com
Mon Aug 15 12:09:28 PDT 2016


dmd does not allow anything larger. Shouldn't the limit depend on the 
.data segment size, which can be specified by the system? Is there a 
technical reason?

Observing that the limit is actually one less (note -1 below), it's 
probably due to an old limitation where indexes were limited to 24 bits?

static ubyte[16 * 1024 * 1024 - 1] arr;

Ali


More information about the Digitalmars-d mailing list