16MB static arrays again...
Walter Bright via Digitalmars-d
digitalmars-d at puremagic.com
Wed Aug 24 02:38:43 PDT 2016
On 8/24/2016 12:50 AM, Tomer Filiba wrote:
> As for the "use dynamic arrays instead", this poses two problems:
> 1) Why? I know everything in compile-time, why force me to (A) allocate it
> separately in `shared static this()`
I'm not sure how that hurts anything. It's just a call to malloc().
> and (B) introduce all sorts of runtime bound checks?
There won't be runtime bounds checks if you use pointers.
> 2) Many times I need memory-contiguity, e.g., several big arrays inside a
> struct, which is dumped to disk/sent over network. I can't use pointers there.
I don't know why pointers cannot be used. Can you show the struct definition
you're using?
More information about the Digitalmars-d
mailing list