I heard that there is a hard limit on the size of .Net Array
. It is said that the maximum amount of memory that can be allocated to any single instance of an Array
object ( regardless of whether it's int[]
, double[]
or your own array) is 2GB. And no, if you have a 64 bit machine, the 2GB limit is still there.
I'm not sure whether my impression is correct or not. Anyone can confirm?
The theoretical maximum Java array size is 2,147,483,647 elements.
There is no fixed limit to the size of an array in C. The size of any single object, including of any array object, is limited by SIZE_MAX , the maximum value of type size_t , which is the result of the sizeof operator.
You cannot resize an array in C#, but using Array. Resize you can replace the array with a new array of different size.
In versions of .NET prior to 4.5, the maximum object size is 2GB. From 4.5 onwards you can allocate larger objects if gcAllowVeryLargeObjects is enabled. Note that the limit for string
is not affected, but "arrays" should cover "lists" too, since lists are backed by arrays.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With