6
Specifically the array can have up to 4 billion elements, I think, and the most common sizes of elements should be 4, 8 or 16 bytes.
I ask, what is the maximum size that the object can occupy in memory? Would it be 4 GB in 32 bits? It is unlimited in 64 bits?
If it is only the size of the array has this "limitation" of items that it has, well observed.
– Harlan Gomes Nascimento
@Harlangomesnascimento Exact, and still has the fact that even the constructor allowing the initialization of a
arraywith along, the final object does not yet support an index of typelong.– OnoSendai
With the option
gcAllowVeryLargeObjectsthe index can useSystem.UInt32.MaxValue, so it can go beyond the 2 billion elements.– Maniero
That I didn’t know. Thanks for the @bigown tip!
– OnoSendai