# TTree memory limit

**URL:** <https://root-forum.cern.ch/t/ttree-memory-limit/51594>\
**Category:** Newbie\
**Created:** [September 17, 2022, 6:34pm UTC](https://root-forum.cern.ch/t/ttree-memory-limit/51594 "2022-09-17T18:34:00Z")\
**Posts on this page:** 1\
**Showing post:** 3

<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:** [September 19, 2022, 4:52pm UTC](https://root-forum.cern.ch/t/ttree-memory-limit/51594/3 "2022-09-19T16:52:03Z")

</div>

@pcanal The “hadd” is used here.

@OtaviusDecius Try:

> [@Root 6.04.14 hadd 100Gb and rootlogon](https://root-forum.cern.ch/t/root-6-04-14-hadd-100gb-and-rootlogon/24581/2):
>
> Indeed hadd does not load the rootlogon file. However you can still manager using the following pattern. Use a source file (let’s called it startup.C) like #include "TTree.h" int startup() { TTree::SetMaxTreeSize( 1000000000000LL ); // 1 TB return 0; } namespace { static int i = startup(); } compile it into a shared library, for example with: root.exe -b -l -q startup.C+ and then use LD\_PRELOAD (DYLD\_INSERT\_LIBRARIES on MacOS) to preload that library: DYLD\_INSERT\_LIBRARIES=startu…

---

_[View the full topic](https://root-forum.cern.ch/t/ttree-memory-limit/51594)._
