Static array size limit
simendsjo
simen.endsjo at pandavre.com
Sat Apr 2 13:45:08 PDT 2011
On 02.04.2011 16:45, bearophile wrote:
> simendsjo:
>
>> http://digitalmars.com/d/2.0/arrays.html says static arrays are
>> limited to 16mb, but I can only allocate 1mb.
>> My fault, or bug?
>
> It accepts 4_000_000 ints, but not (16 * 1024 * 1024) / int.sizeof = 4_194_304 ints. I don't know why it's designed this way... I'd like 4_194_304 ints.
>
> Bye,
> bearophile
The main problem is that it gives a Stack Overflow already at 250_001
More information about the Digitalmars-d-learn
mailing list