# How to make a tree with size larger than 2G?

**URL:** <https://root-forum.cern.ch/t/how-to-make-a-tree-with-size-larger-than-2g/5301>\
**Category:** ROOT\
**Created:** [September 10, 2007, 10:56pm UTC](https://root-forum.cern.ch/t/how-to-make-a-tree-with-size-larger-than-2g/5301 "2007-09-10T22:56:11Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![jing](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/j/71e660/32.png) [@jing](https://root-forum.cern.ch/u/jing)\
**Post date:** [September 10, 2007, 10:56pm UTC](https://root-forum.cern.ch/t/how-to-make-a-tree-with-size-larger-than-2g/5301/1 "2007-09-10T22:56:11Z")

</div>

I try to use TTree::SetMaxTreeSize(ULong64\_t maxsize); however, it seems that the maxsize is not a 8 bytes word, but a 4 bytes signed long since it can’t take any number larger than 2147483647. Then how can I make the tree size larger than 2G bytes?

Thank you!

---

<div class="post-metadata">

**Author:** ![brun](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/b/b9e5f3/32.png) [@brun](https://root-forum.cern.ch/u/brun)\
**Post date:** [September 11, 2007, 7:18am UTC](https://root-forum.cern.ch/t/how-to-make-a-tree-with-size-larger-than-2g/5301/2 "2007-09-11T07:18:07Z")

</div>

I suspect something wrong on your side when setting the Long64\_t value.  
Do something like

` Long64_t mymax = 7000000000ll; //note the "ll" at the end
   TTree::SetMatTreeSize(mymax);
`  
Rene
