Re: ROOT crashes when writing a large TVectorF object

From: Alexandr Malusek <>
Date: Mon, 06 Jun 2005 19:34:05 +0200

Hi Edmond,

> The vector length is an "Int_t" and
> root [0] return TMath::Power(2,31)
> (Double_t)2.14748364800000000e+09
> root [1] return 512*512*1273
> (const int)333709312
> So your request is way beyond the maximum integer .

No, it is not. To allocate 512*512*1273 Float_t numbers (4 B) you need 4*512*512*1273 B = (2*512)*(2*512)*1273 B = 1273 MiB. ROOT can handle it on a machine with 2 GiB RAM:

root [0] TVectorF vec(512*512*1273);
root [1]

It seems that the Write() routine allocates additional memory (perhaps for a copy of the object) and this causes the root.exe process to terminate. I think the problem is that a single process cannot exceed 2 GiB RAM on the x86 architecture. (The additional 4 GiB of swap space does not help in this case.)

I'll try to find a workaround by writing and reading the object to a TTree. I'll also try it on the AMD64 architecture.

BTW: The 512*512*1273 array comes from a CT (Computed Tomography) scanner. The array is big but current machines can handle it.

Alexandr Received on Mon Jun 06 2005 - 19:34:15 MEST

This archive was generated by hypermail 2.2.0 : Tue Jan 02 2007 - 14:45:09 MET