Often repeated array allocations
bearophile
bearophileHUGS at lycos.com
Sat Jul 20 14:39:30 PDT 2013
Namespace:
> Yeah, but aren't 4000 elements a bit much for a stack allocated
> array?
4000 floats take about 16 KB. If your function is not recursive
and it's not much transitively recursive, then I think it's
acceptable. But how much stack are your other functions using?
You have to estimate if you have enough stack space. Today it's
very easy to have 50+ MB of stack, if necessary. DMD on Windows
supports a linker command like this:
-L/STACK:200000000
Bye,
bearophile
More information about the Digitalmars-d-learn
mailing list