I need a large size of array buffer to store testing data in my ea.such as the code below:
when the value of size is to large,the compiler will come out a error said :array is too large.
I want to know the largest value of size that I can used.
Total amount of elements in the array cannot exceed 2147483647.
I found this in the Docs about ArrayResize().
If you try this scripts below:
int size=2000000000; // < 2147483647
ArrayResize(b,size)== -1 ||
ArrayResize(c,size)== -1 ||
you will away get "resize error". and if you declare a static array:
the compiler get error: array is too large
Of course you need to have sufficient memory to allocate such size to your arrays.
A double is 8 bytes x 2,000,000,000 = around 16 Gb only for 1 array.