Issue 3D histogram

Dear all,

when I try to Fill a 3D histogram, I get a segmentation violation, but I don’t really get the point.
Here is the code:

TH3D *htest = new TH3D("htest", "htest", 2000, 0., 2000., 2000, 0., 2000., 2000, 0., 2000.);

  if ((flist = fopen("TestFile.txt", "r")) !=  NULL ) {
    
    while(!feof(flist)) {
       
      fscanf(flist,"%lf   %lf   %lf",  &xx, &yy, &zz);
      printf("ii: %d  X: %lf  Y: %lf  Z: %lf\n", ii, xx, yy, zz);  
      htest -> Fill(xx, yy, zz);
      ii++;
      
    }
    
  }
  
  fclose(flist);

Thank you for support!

2000 * 2000 * 2000 * 8 B = 59.6 GB

I see…I didn’t think about! Is it about 2Gb the size limit for ROOT objects?

In general, the operating system imposes some “user limits”. Try:
[bash]$ ulimit -S -a
[bash]$ ulimit -H -a
[tcsh]$ limit
[tcsh]$ limit -h
If any application, while running, exceeds any of these limits, it will be killed (note also, on a i686 32-bit system, the address space is 4 GB; no such problem on a x86_64 64-bit system, as long as you have enough RAM plus “swap space” available).