title: error opening file for reading: Value too large for defined data type
body: <pre><code>#include &lt;stdio.h&gt;
  #include &lt;stdlib.h&gt;
  #include &lt;sys/types.h&gt;
  #include &lt;sys/stat.h&gt;
  #include &lt;unistd.h&gt;
  #include &lt;fcntl.h&gt;
  #include &lt;sys/mman.h&gt;
  #include &lt;iostream&gt;
  using namespace std;
  
  
  #define FILEPATH "file.txt"
  #define NUMINTS  (268435455)
  #define FILESIZE (NUMINTS * sizeof(int))
  
  int main()
  {
      int i=sizeof(int);
      int fd;
      double *map;   //mmapped array of int's
    fd = open(FILEPATH, O_RDONLY);
      if (fd == -1) {
      perror("Error opening file for reading");
      exit(EXIT_FAILURE);
      }
  
  
  
      map = (double*)mmap(0, FILESIZE, PROT_READ, MAP_SHARED, fd, 0);
      if (map == MAP_FAILED) {
      close(fd);
      perror("Error mmapping the file");
      exit(EXIT_FAILURE);
      }
  
      for (i = 100000; i &lt;=100100; ++i) {
      cout&lt;&lt;map[i]&lt;&lt;endl;
      }
  
      if (munmap(map, FILESIZE) == -1) {
      perror("Error un-mmapping the file");
  
      }
  close(fd);
      return 0;
  }
  </code></pre>
  
  <p>I am getting error that file size is too large.</p>