title: malloc not allocating the specified memory (64 bit)
body: <p>I have 32 GB of RAM on my system and want to read and keep a file of 15 GB in memory. When I tried to execute following code, the output was: "n read = 1073741824", which corresponds to exactly 1 GB, whereas it should have read bytes corresponding to size of file. </p>
  
  <p>I checked even running the system resource manager, and that has an increase of exactly 1GB, which means that malloc has not allocated 17 GB of space as was expected. </p>
  
  <p>With 64 bit system, I could have read upto 8TB (with 32 bit system it is 2GB or more specific 1.5 GB).</p>
  
  <p>I am on 64 bit machine and OS, and I have already configured Visual C++ to build and execute 64 bit binaries by following the steps given at: <a href="http://software.intel.com/en-us/articles/generating-64-bit-binary-executables-using-microsoft-visual-studio-net" rel="nofollow">Intel Link</a> [Verified that it is 64 bits by checking the size of int - earlier it was 4 bytes, now it is 8 bytes]</p>
  
  <p>What could I tweak in order to allocate and use memory larger than 1 GB?</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  #include &lt;cstdlib&gt;
  
  #define PATH "C:\\train"
  #define SIZE 17*1024*1024*1024
  
  int main()
  {
          FILE * fp = fopen(PATH, "r");
      char* buff = (char*)malloc(SIZE);
      int nRead = fread(buff, 1, SIZE,  fp);
      buff[nRead] = 0;
      printf("n read = %d\n", nRead);
  
      int a;
      scanf("%d" ,&amp;a);
      return 0;
  }
  </code></pre>