I'm trying to initialize a jagged array of 120 000 x 4600 for a data mining algorithm but I have an OutOfMemoryException
exception
double[][] array = new double[120000][];
for (int i = 0; i < array.Length; i++)
{
array[i] = new double[4600];
}
it throws when i
is around 49 000
I know .Net is limited to 2GB per object, but I thought that the array here would be a list of addresses to an array of double. So it wouldn't be a big single object.
I thought that's why Jon Skeet suggests an jagged array for this question OutOfMemoryException on declaration of Large Array
I don't think that I understand his answer.
Is it one big object and if it's not why does it throw an exception.
Thank you