#include <BlockWipedAllocator.h>
Public Types | |
typedef BlockWipedAllocator | Allocator |
typedef __gnu_cxx::hash_map < std::size_t, Allocator > | Pool |
Public Member Functions | |
Allocator & | allocator (std::size_t typeSize) |
BlockWipedPool (std::size_t blockSize, std::size_t maxRecycle) | |
void | clear () |
template<typename Visitor > | |
void | visit (Visitor &visitor) const |
void | wipe (bool force=true) |
Private Attributes | |
std::size_t | m_blockSize |
Allocator * | m_last |
std::size_t | m_lastSize |
std::size_t | m_maxRecycle |
Pool | m_pool |
Definition at line 110 of file BlockWipedAllocator.h.
Definition at line 112 of file BlockWipedAllocator.h.
typedef __gnu_cxx::hash_map<std::size_t, Allocator> BlockWipedPool::Pool |
Definition at line 114 of file BlockWipedAllocator.h.
BlockWipedPool::BlockWipedPool | ( | std::size_t | blockSize, |
std::size_t | maxRecycle | ||
) |
Definition at line 89 of file BlockWipedAllocator.cc.
: m_blockSize(blockSize), m_maxRecycle(maxRecycle), m_last(0), m_lastSize(0){}
BlockWipedPool::Allocator & BlockWipedPool::allocator | ( | std::size_t | typeSize | ) |
Definition at line 93 of file BlockWipedAllocator.cc.
References likely, m_blockSize, m_last, m_lastSize, m_maxRecycle, m_pool, AlCaHLTBitMon_ParallelJobs::p, and edm::second().
Referenced by BlockWipedAllocated< _bqueue_item< T > >::allocator(), BlockWipedPoolAllocated::allocator(), and blockWipedAllocator().
void BlockWipedPool::clear | ( | void | ) |
Definition at line 107 of file BlockWipedAllocator.cc.
References BlockWipedAllocator::clear(), m_pool, and edm::second().
Referenced by BlockWipedAllocatorService::wiper().
{ std::for_each(m_pool.begin(),m_pool.end(),boost::bind(&Allocator::clear, boost::bind(&Pool::value_type::second,_1) )); }
void BlockWipedPool::visit | ( | Visitor & | visitor | ) | const [inline] |
Definition at line 125 of file BlockWipedAllocator.h.
References m_pool, edm::second(), and cmsPerfHarvest::visit().
Referenced by BlockWipedAllocatorService::dump().
{ std::for_each(m_pool.begin(),m_pool.end(),boost::bind(&Visitor::visit,visitor, boost::bind(&Pool::value_type::second,_1) )); }
void BlockWipedPool::wipe | ( | bool | force = true | ) |
Definition at line 101 of file BlockWipedAllocator.cc.
References m_pool, edm::second(), and BlockWipedAllocator::wipe().
Referenced by BlockWipedAllocatorService::preModule(), and BlockWipedAllocatorService::wiper().
{ std::for_each(m_pool.begin(),m_pool.end(),boost::bind(&Allocator::wipe, boost::bind(&Pool::value_type::second,_1),force )); }
std::size_t BlockWipedPool::m_blockSize [private] |
Definition at line 133 of file BlockWipedAllocator.h.
Referenced by allocator().
Allocator* BlockWipedPool::m_last [private] |
Definition at line 136 of file BlockWipedAllocator.h.
Referenced by allocator().
std::size_t BlockWipedPool::m_lastSize [private] |
Definition at line 137 of file BlockWipedAllocator.h.
Referenced by allocator().
std::size_t BlockWipedPool::m_maxRecycle [private] |
Definition at line 134 of file BlockWipedAllocator.h.
Referenced by allocator().
Pool BlockWipedPool::m_pool [private] |
Definition at line 135 of file BlockWipedAllocator.h.
Referenced by allocator(), clear(), visit(), and wipe().