On Wednesday, 24 August 2016 at 09:38:43 UTC, Walter Bright wrote:
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?

Our configuration is a struct of several static hash tables (allocated in-place, not via GC). So the entire configuration is contiguous is memory, which allows us to dump/load/send it easily.

When we increase the capacity of these tables we run into these pain-in-the-ass 16MB limits. So although the struct itself is over 16MB, no single table can cross several thousand entries, as the static arrays it uses internally would overflow that boundary.

The configuration itself may very well be dynamically allocated (e.g., not a global variable) but that won't solve anything as the restriction is on the *type* of the array.

-tomer

Reply via email to