CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Types | Public Member Functions | Private Attributes
BlockWipedPool Class Reference

#include <BlockWipedAllocator.h>

Public Types

typedef BlockWipedAllocator Allocator
 
typedef std::map< std::size_t,
Allocator
Pool
 

Public Member Functions

Allocatorallocator (std::size_t typeSize)
 
 BlockWipedPool (std::size_t blockSize)
 
void clear ()
 
template<typename Visitor >
void visit (Visitor &visitor) const
 
void wipe ()
 

Private Attributes

std::size_t m_blockSize
 
Pool m_pool
 

Detailed Description

Definition at line 101 of file BlockWipedAllocator.h.

Member Typedef Documentation

Definition at line 103 of file BlockWipedAllocator.h.

typedef std::map<std::size_t, Allocator> BlockWipedPool::Pool

Definition at line 104 of file BlockWipedAllocator.h.

Constructor & Destructor Documentation

BlockWipedPool::BlockWipedPool ( std::size_t  blockSize)

Definition at line 78 of file BlockWipedAllocator.cc.

78 : m_blockSize(blockSize){}
std::size_t m_blockSize

Member Function Documentation

BlockWipedPool::Allocator & BlockWipedPool::allocator ( std::size_t  typeSize)

Definition at line 81 of file BlockWipedAllocator.cc.

References m_blockSize, m_pool, L1TEmulatorMonitor_cff::p, mathSSE::return(), and edm::second().

Referenced by BlockWipedPoolAllocated::allocator(), BlockWipedAllocated< T >::allocator(), and blockWipedAllocator().

81  {
82  Pool::iterator p=m_pool.find(typeSize);
83  if (p!=m_pool.end()) return (*p).second;
84  return (*m_pool.insert(std::make_pair(typeSize,Allocator(typeSize, m_blockSize))).first).second;
85 }
return((rh^lh)&mask)
U second(std::pair< T, U > const &p)
BlockWipedAllocator Allocator
std::size_t m_blockSize
void BlockWipedPool::clear ( void  )
template<typename Visitor >
void BlockWipedPool::visit ( Visitor &  visitor) const
inline
void BlockWipedPool::wipe ( )

Definition at line 87 of file BlockWipedAllocator.cc.

References m_pool, edm::second(), and BlockWipedAllocator::wipe().

Referenced by BlockWipedAllocatorService::wiper().

87  {
88  std::for_each(m_pool.begin(),m_pool.end(),boost::bind(&Allocator::wipe,
89  boost::bind(&Pool::value_type::second,_1)
90  ));
91 }
U second(std::pair< T, U > const &p)

Member Data Documentation

std::size_t BlockWipedPool::m_blockSize
private

Definition at line 123 of file BlockWipedAllocator.h.

Referenced by allocator().

Pool BlockWipedPool::m_pool
private

Definition at line 124 of file BlockWipedAllocator.h.

Referenced by allocator(), clear(), visit(), and wipe().