I’m trying the following simple code. It consume a huge amount of memory (~20 GB). The size of a vector<pair<int,float>> is 24 byte, I thus expect the total memory consumption is 24*4e5 ~10MB. Could it be a memory leak or I didn’t use the pyROOT correctly? Any helps are appreciated.
ROOT version: ROOT 6.12/07
python version: 2.7.14
import ROOT
nmax = 400000
a = ROOT.std.vector('pair<int, float>')(nmax)
for i in range(nmax):
if i%10000 ==0:
print(i, '\n')
a[i] = ROOT.std.pair('int, float')(1, 2)