Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>The array limit is, afaik, fixed as int32 even on 64-bit. There is a cap on the maximum size of a single object. However, you could have a nice big jagged array quite easily.</p> <p>Worse; because references are larger in x64, for ref-type arrays you actually get <em>less</em> elements in a single array.</p> <p>See <a href="http://www.twine.com/item/11qtqln9x-1s/josh-williams" rel="nofollow noreferrer">here</a>:</p> <blockquote> <p>I’ve received a number of queries as to why the 64-bit version of the 2.0 .Net runtime still has array maximum sizes limited to 2GB. Given that it seems to be a hot topic of late I figured a little background and a discussion of the options to get around this limitation was in order.</p> <p>First some background; in the 2.0 version of the .Net runtime (CLR) we made a conscious design decision to keep the maximum object size allowed in the GC Heap at 2GB, even on the 64-bit version of the runtime. This is the same as the current 1.1 implementation of the 32-bit CLR, however you would be hard pressed to actually manage to allocate a 2GB object on the 32-bit CLR because the virtual address space is simply too fragmented to realistically find a 2GB hole. Generally people aren’t particularly concerned with creating types that would be >2GB when instantiated (or anywhere close), however since arrays are just a special kind of managed type which are created within the managed heap they also suffer from this limitation.</p> </blockquote> <hr> <p>It should be noted that in .NET 4.5 the <em>memory size</em> limit is optionally removed by the <a href="http://msdn.microsoft.com/en-us/library/hh285054(v=vs.110).aspx" rel="nofollow noreferrer">gcAllowVeryLargeObjects</a> flag, however, this doesn't change the maximum <em>dimension</em> size. The key point is that if you have arrays of a custom type, or multi-dimension arrays, then you can now go beyond 2GB in memory size.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload