42 if(fAllocatorList ==
nullptr)
46 return fAllocatorList;
52 return fAllocatorList;
56G4AllocatorList::G4AllocatorList() {}
64 fList.push_back(alloc);
70 auto itr = fList.cbegin();
75 G4cout <<
"================== Deleting memory pools ==================="
78 for(; itr != fList.cend(); ++itr)
80 mem = (*itr)->GetAllocatedSize();
85 (*itr)->ResetStorage();
92 G4cout <<
"Pool ID '" << (*itr)->GetPoolType()
93 <<
"', size : " << std::setprecision(3) << mem / 1048576
94 << std::setprecision(6) <<
" MB" <<
G4endl;
96 (*itr)->ResetStorage();
101 G4cout <<
"Number of memory pools allocated: " <<
Size()
102 <<
"; of which, static: " << i <<
G4endl;
103 G4cout <<
"Dynamic pools deleted: " << j
104 <<
" / Total memory freed: " << std::setprecision(2)
105 << tmem / 1048576 << std::setprecision(6) <<
" MB" <<
G4endl;
106 G4cout <<
"============================================================"
G4GLOB_DLL std::ostream G4cout
static G4AllocatorList * GetAllocatorListIfExist()
static G4AllocatorList * GetAllocatorList()
void Register(G4AllocatorBase *)
void Destroy(G4int nStat=0, G4int verboseLevel=0)