42 if(fAllocatorList ==
nullptr)
46 return fAllocatorList;
52 return fAllocatorList;
61 fList.push_back(alloc);
67 auto itr = fList.cbegin();
72 G4cout <<
"================== Deleting memory pools ==================="
75 for(; itr != fList.cend(); ++itr)
77 mem = (*itr)->GetAllocatedSize();
82 (*itr)->ResetStorage();
89 G4cout <<
"Pool ID '" << (*itr)->GetPoolType()
90 <<
"', size : " << std::setprecision(3) << mem / 1048576
91 << std::setprecision(6) <<
" MB" <<
G4endl;
93 (*itr)->ResetStorage();
98 G4cout <<
"Number of memory pools allocated: " <<
Size()
99 <<
"; of which, static: " << i <<
G4endl;
100 G4cout <<
"Dynamic pools deleted: " << j
101 <<
" / Total memory freed: " << std::setprecision(2)
102 << tmem / 1048576 << std::setprecision(6) <<
" MB" <<
G4endl;
103 G4cout <<
"============================================================"
G4GLOB_DLL std::ostream G4cout
static G4AllocatorList * GetAllocatorListIfExist()
static G4AllocatorList * GetAllocatorList()
void Register(G4AllocatorBase *)
void Destroy(G4int nStat=0, G4int verboseLevel=0)