Hello Rene, >Without more information (number of keys, total size..), my guess is that >you are reaching the maximum file size limit of 2 GBytes. Sorry I forgot to mention it... the file size is slightly over 400MB (so that's not it). It contains about 35,000 TObjArray's the largest of which holds upwards of 4000 objects. Here is the file header dump of the last good before failure file (the update would attempt to add a single object to each of the TObjArray's and it fails somwhere in the middle of the run). --- fD 5 File descriptor fBEGIN 64 First used byte in file fEND 419809775 Last used byte in file fVersion 22402 File format version fCompress 1 (=1 file is compressed, 0 otherwise) fOption.*fData READ fUnits 4 Number of bytes for file pointers fSeekFree 316042152 Location on disk of free segments structure fNbytesFree 115025 Number of bytes for free segments structure fWritten 0 Number of objects written so far fSumBuffer 0 Sum of buffer sizes of objects written so far fSum2Buffer 0 Sum of squares of buffer sizes of objects written so far *fFree ->0 Free segments linked list table fBytesWrite 0 Number of bytes written to this file fBytesRead 2.43992e+006Number of bytes read from this file fModified 1 true if directory has been modified fWritable 0 true if directory is writable fDatimeC.fDatime 20000508/143131 fDatimeM.fDatime 20000624/173839 fNbytesKeys 2439680 Number of bytes for the keys fNbytesName 58 Number of bytes in TNamed at creation time fSeekDir 64 Location of directory on file fSeekParent 0 Location of parent directory on file fSeekKeys 415730344 Location of Keys record on file *fFile ->1013568 pointer to current file in memory *fMother ->0 pointer to mother of the directory *fList ->1013640 Pointer to objects list in memory *fKeys ->1013858 Pointer to keys list in memory fName.*fData pfile.root fTitle.*fData fUniqueID 0 object unique identifier fBits 50331649 bit field status word --- >What you describe seems to be an obvious candidate for TTree >instead of writing individual objecst as TKeys. Allow me to address your suggestion in a separate e-mail. > >Rene Brun Thank you, /Mariusz On 25 Jun 2000, Mariusz Stanczak wrote: > Dear All, > I have lots of small objects (48 bytes/object) that I write to a root file. > I use TObjArray and to avoid the overhead of keys (42 bytes/key) I write the > array with kSingleKey option. Each array is a separate observation sequence > containing at the moment upwards of ~4000 objects. > All was well, but now I seem to have hit against some hard coded limits... > when trying to add a new object I get the following error(s): > --- > Error in <TKey::Create>: Cannot allocate 2439835 bytes for ID = pfile.root > Title = > Error in <TKey::Create>: Cannot allocate 2439800 bytes for ID = pfile.root > Title = > ... > --- > I do not think it matters in this case, but this is on Win2K with 2.24/05. I > also tried the new version 2.25/00 and got: > --- > Error in <TKey::Create>: Cannot allocate 2439835 bytes for ID = pfile.root > Title = > Error in <TKey::Create>: Cannot allocate 2439835 bytes for ID = pfile.root > Title = > --- > after which the program aborted with a segmentation violation (2.24/05 > continued on but the resulting file was corrupted, which became evident on the > next update run). > > What could I do? > > Thanks, > > /Mariusz > > ____________________________________________________________________ Get free email and a permanent address at http://www.amexmail.com/?A=1
This archive was generated by hypermail 2b29 : Tue Jan 02 2001 - 11:50:28 MET