title: Memory limitations in a 64-bit .Net application?
body: <p>On my laptop, running 64 bit Windows 7 and with 2 Gb of free memory (as reported by Task Manager), I'm able to do:</p>
  
  <pre><code>var x = new Dictionary&lt;Guid, decimal&gt;( 30 * 1024 *1024 );
  </code></pre>
  
  <p>Without having a computer with more RAM at my hands, I'm wondering if this will scale so that on a computer with 4 Gb free memory, I'll be able to allocate 60M items instead of "just" 30M and so on?</p>
  
  <p>Or are there other limitations (of .Net and/or Windows) that I'll bump into before I'm able to consume all available RAM?</p>
  
  <p><strong>Update:</strong> OK, so I'm not allowed to allocate a single object larger than 2 Gb. That's important to know! But then I'm of course curious to know if I'll be able to fully utilize all memory by allocating 2 Gb chunks like this:</p>
  
  <pre><code>  var x = new List&lt;Dictionary&lt;Guid, decimal&gt;&gt;();
    for ( var i = 0 ; i &lt; 10 ; i++ )
      x.Add( new Dictionary&lt;Guid, decimal&gt;( 30 * 1024 *1024 ) );
  </code></pre>
  
  <p>Would this work if the computer have >20Gb free memory?</p>