CMS 3D CMS Logo

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

#include <BlockWipedAllocator.h>

Inheritance diagram for BlockWipedPoolAllocated:
ReferenceCountedPoolAllocated BasicTrajectoryState reco::BasicGhostTrackState reco::BasicTransientTrack TransientTrackingRecHit BasicMultiTrajectoryState BasicSingleTrajectoryState reco::TrackGhostTrackState reco::VertexGhostTrackState reco::GsfTransientTrack reco::TrackTransientTrack reco::TransientTrackFromFTS BeamSpotTransientTrackingRecHit GCC11_FINAL GCC11_FINAL GCC11_FINAL GCC11_FINAL GCC11_FINAL GCC11_FINAL GCC11_FINAL GenericTransientTrackingRecHit KFBasedPixelFitter::MyBeamSpotHit TransientTrackingRecHitByValue< RecHit > TransientTrackingRecHitByValue< InvalidTrackingRecHit >

Public Member Functions

virtual ~BlockWipedPoolAllocated ()
 

Static Public Member Functions

static BlockWipedAllocatorallocator (size_t s)
 
static void operator delete (void *p, size_t s)
 
static void * operator new (size_t s, void *p)
 
static void * operator new (size_t s)
 
static BlockWipedAllocator::Stat stat (size_t s)
 
static void usePool ()
 

Static Public Attributes

static int s_alive =0
 
static bool s_usePool =false
 

Detailed Description

Definition at line 147 of file BlockWipedAllocator.h.

Constructor & Destructor Documentation

virtual BlockWipedPoolAllocated::~BlockWipedPoolAllocated ( )
inlinevirtual

Definition at line 149 of file BlockWipedAllocator.h.

149 {}

Member Function Documentation

BlockWipedAllocator & BlockWipedPoolAllocated::allocator ( size_t  s)
static

Definition at line 164 of file BlockWipedAllocator.cc.

References BlockWipedPool::allocator(), and blockWipedPool().

Referenced by stat().

164  {
165  return blockWipedPool().allocator(s);
166 }
Allocator & allocator(std::size_t typeSize)
BlockWipedPool & blockWipedPool(BlockWipedPool *p=0)
void BlockWipedPoolAllocated::operator delete ( void *  p,
size_t  s 
)
static

Definition at line 156 of file BlockWipedAllocator.cc.

References cppFunctionSkipper::operator, AlCaHLTBitMon_ParallelJobs::p, and alignCSCRings::s.

156  {
157  if (0==p) return;
158  // if (s<100) std::cout << typeid(*(BlockWipedPoolAllocated*)(p)).name() << std::endl;
159  s_alive--;
160  (s_usePool) ? allocator(s).dealloc(p) : ::operator delete(p);
161 
162 }
static BlockWipedAllocator & allocator(size_t s)
void * BlockWipedPoolAllocated::operator new ( size_t  s,
void *  p 
)
static

Definition at line 147 of file BlockWipedAllocator.cc.

References AlCaHLTBitMon_ParallelJobs::p.

147  {
148  return p;
149 }
void * BlockWipedPoolAllocated::operator new ( size_t  s)
static

Definition at line 142 of file BlockWipedAllocator.cc.

References cppFunctionSkipper::operator, and alignCSCRings::s.

142  {
143  s_alive++;
144  return (s_usePool) ? allocator(s).alloc() : ::operator new(s);
145 }
static BlockWipedAllocator & allocator(size_t s)
BlockWipedAllocator::Stat BlockWipedPoolAllocated::stat ( size_t  s)
static

Definition at line 169 of file BlockWipedAllocator.cc.

References allocator(), and BlockWipedAllocator::stat().

169  {
170  return allocator(s).stat();
171 }
static BlockWipedAllocator & allocator(size_t s)
void BlockWipedPoolAllocated::usePool ( )
static

Definition at line 135 of file BlockWipedAllocator.cc.

References s_alive, and s_usePool.

Referenced by BlockWipedAllocatorService::BlockWipedAllocatorService().

135  {
136  // throw id s_alive!=0???
137  if (0==s_alive) s_usePool=true;
138 }

Member Data Documentation

int BlockWipedPoolAllocated::s_alive =0
static
bool BlockWipedPoolAllocated::s_usePool =false
static