26 int vcap(vhit.capacity());
33 cout <<
"initial capacity " << vcap << endl;
35 for(
int i(0); i<
size; ++i) {
41 vhit.push_back(
DHit(i,i,i));
47 if (vold != vcap) cout <<
"iteration " << i <<
" new capacity " << vcap <<endl;
49 if (((
int)p3-(
int)p2) != ((
int)p2-(
int)p1)) cout <<
"iteration " << i <<
" new chunk @" << hex << p3 <<
" previous was @" << p2 << dec << endl;
51 cout <<
"iteration " << i <<
" P3 @" << hex << p3 <<
" p2 @" << p2 <<
" p1 @" << p1 << dec <<
' ' << (int)p3-(
int)p2 <<
' ' <<(int)p2-(
int)p1 <<endl;
56 return StatusCode::SUCCESS;
vector< DHit > HitContainer
size_t size() const
Number of registered mappings.
virtual StatusCode execute(const EventContext &ctx) override
Execute method.
Gaudi::Property< int > m_vectorSize
Property to setup the size of the Hit container.
std::map< int, IHit * > m_mixMap
Gaudi::Property< bool > m_mapIt
Property to introduce some fragmentation.
Gaudi::Property< int > m_2bReserved
Property to setup the amount of elements to reserve.
PerfMonTestPolyVectorAlg.h Example for the memory optimization tutorial.