32 std::cout <<
"initial capacity " << vcap << std::endl;
34 for(
int i(0); i<size; ++i) {
46 if (vold != vcap) std::cout <<
"iteration " << i <<
" new capacity " << vcap <<std::endl;
48 if (((
int)p3-(
int)p2) != ((
int)p2-(
int)p1)) std::cout <<
"iteration " << i <<
" new chunk @" << hex << p3 <<
" previous was @" << p2 << dec << std::endl;
50 std::cout <<
"iteration " << i <<
" P3 @" << hex << p3 <<
" p2 @" << p2 <<
" p1 @" << p1 << dec <<
' ' << (int)p3-(
int)p2 <<
' ' <<(int)p2-(
int)p1 <<std::endl;
55 return StatusCode::SUCCESS;
An STL vector of pointers that by default owns its pointed-to elements.
DataVector< IHit > HitPtrContainer
a typed memory pool that saves time spent allocation small object.
pointer nextElementPtr()
obtain the next available element in pool by pointer pool is resized if its limit has been reached On...
void reserve(size_type n)
Attempt to preallocate enough memory for a specified number of elements.
value_type push_back(value_type pElem)
Add an element to the end of the collection.
size_type capacity() const noexcept
Returns the total number of elements that the collection can hold before needing to allocate more mem...
std::map< int, IHit * > m_mixMap
Gaudi::Property< int > m_2bReserved
Property to setup the amount of elements to reserve.
virtual StatusCode execute() override
Gaudi::Property< int > m_mixture
Property to set DHIT/FHIT ratio.
Gaudi::Property< bool > m_mapIt
Property to introduce some fragmentation.
Gaudi::Property< int > m_vectorSize
Property to setup the size of the Hit container.
PerfMonTestPolyVectorAlg.h Example for the memory optimization tutorial.
@ VIEW_ELEMENTS
this data object is a view, it does not own its elmts