# Issue 3D histogram

**URL:** <https://root-forum.cern.ch/t/issue-3d-histogram/16012>\
**Category:** ROOT\
**Created:** [May 2, 2013, 3:12pm UTC](https://root-forum.cern.ch/t/issue-3d-histogram/16012 "2013-05-02T15:12:02Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Baloo](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/b/a87d85/32.png) [@Baloo](https://root-forum.cern.ch/u/Baloo)\
**Post date:** [May 2, 2013, 3:12pm UTC](https://root-forum.cern.ch/t/issue-3d-histogram/16012/1 "2013-05-02T15:12:02Z")

</div>

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:

```auto
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!

---

<div class="post-metadata">

**Author:** ![Wile\_E\_Coyote](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/wile_e_coyote/32/12417_2.png) [@Wile\_E\_Coyote](https://root-forum.cern.ch/u/Wile_E_Coyote)\
**Post date:** [May 2, 2013, 3:16pm UTC](https://root-forum.cern.ch/t/issue-3d-histogram/16012/2 "2013-05-02T15:16:47Z")

</div>

2000 \* 2000 \* 2000 \* 8 B = 59.6 GB

---

<div class="post-metadata">

**Author:** ![Baloo](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/b/a87d85/32.png) [@Baloo](https://root-forum.cern.ch/u/Baloo)\
**Post date:** [May 2, 2013, 3:35pm UTC](https://root-forum.cern.ch/t/issue-3d-histogram/16012/3 "2013-05-02T15:35:16Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Wile\_E\_Coyote](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/wile_e_coyote/32/12417_2.png) [@Wile\_E\_Coyote](https://root-forum.cern.ch/u/Wile_E_Coyote)\
**Post date:** [May 2, 2013, 3:48pm UTC](https://root-forum.cern.ch/t/issue-3d-histogram/16012/4 "2013-05-02T15:48:47Z")

</div>

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).
