Re: Root files, directories & objects - WinNT (pt 2)

From: Mariusz Stanczak (MStanczak@usa.net)
Date: Tue Dec 07 1999 - 11:14:18 MET


On Sat, 4 Dec 1999 17:24:49 +0100 (MET), Rene Brun wrote:

>Mariusz,
>My guess is that you do not close the directory after having added/updated
>new objects. By default, Root will keep all keys in memory.
   Indeed that was the case.  I was simply doing
		if (!syms->FindObject(t)) {
			f_out->cd();				// change to TOF
			f_out->mkdir(t);			// create new dir
		}
		f_out->cd(t);					// ...and change to it

and root held on to all the in-memory structures.
   If I could take this opportunity to emphasize that the same accumulation
of memory by root (on behalf of the user, but behind his "back") happens on
any directory content access, even if no modification of that content is
performed, as in, for example, dir->Get(obj) (and having to have to Close()
a directory after such use strikes as completely counterintuitive).  Root
should manage it's memory (and user should manage its own), especially since
such holding onto *all* allocated memory leads right now to eventual
strangling of the system.

>In attachment, you will find a small example macro illustrating how to
>create sub directories, write objects into each subdir, close the subdir,
>etc.
   Thank you... it helped.

>Concerning the memory statistics, you forgot to activate the object
>statistics option in your .rootrc file
   Its not the case, and that's all the object statistics I got.  Hmm.

>
>Rene Brun
>
   Thank you Rene,

/Mariusz



This archive was generated by hypermail 2b29 : Tue Jan 04 2000 - 00:43:44 MET