Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
RooLinkedListImplDetails::Pool Class Reference

Definition at line 115 of file RooLinkedList.cxx.

Public Member Functions

 Pool ()
 constructor
 
 ~Pool ()
 destructor
 
void acquire ()
 acquire the pool
 
RooLinkedListElempop_free_elem ()
 pop a free element out of the pool
 
void push_free_elem (RooLinkedListElem *el)
 push a free element back into the pool
 
bool release ()
 release the pool, return true if the pool is unused
 

Private Types

enum  { minsz = 7 , maxsz = 18 , szincr = 1 }
 
typedef std::map< const void *, Chunk * > AddrMap
 
typedef RooLinkedListImplDetails::Chunk Chunk
 a chunk of memory in the pool
 
typedef std::list< Chunk * > ChunkList
 

Private Member Functions

Int_t nextChunkSz () const
 find size of next chunk to allocate (in a hopefully smart way)
 
void updateCurSz (Int_t sz, Int_t incr)
 adjust _cursz to current largest block
 

Private Attributes

AddrMap _addrmap
 
Int_t _cursz
 
ChunkList _freelist
 
UInt_t _refCount
 
UInt_t _szmap [(maxsz - minsz)/szincr]
 

Member Typedef Documentation

◆ AddrMap

typedef std::map<const void*, Chunk*> RooLinkedListImplDetails::Pool::AddrMap
private

Definition at line 125 of file RooLinkedList.cxx.

◆ Chunk

a chunk of memory in the pool

Definition at line 123 of file RooLinkedList.cxx.

◆ ChunkList

typedef std::list<Chunk*> RooLinkedListImplDetails::Pool::ChunkList
private

Definition at line 124 of file RooLinkedList.cxx.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
private
Enumerator
minsz 

minimum chunk size (just below 1 << minsz bytes)

maxsz 

maximum chunk size (just below 1 << maxsz bytes)

szincr 

size class increment (sz = 1 << (minsz + k * szincr))

Definition at line 117 of file RooLinkedList.cxx.

Constructor & Destructor Documentation

◆ Pool()

RooLinkedListImplDetails::Pool::Pool ( )

constructor

Definition at line 152 of file RooLinkedList.cxx.

◆ ~Pool()

RooLinkedListImplDetails::Pool::~Pool ( )

destructor

Definition at line 157 of file RooLinkedList.cxx.

Member Function Documentation

◆ acquire()

void RooLinkedListImplDetails::Pool::acquire ( )
inline

acquire the pool

Definition at line 132 of file RooLinkedList.cxx.

◆ nextChunkSz()

Int_t RooLinkedListImplDetails::Pool::nextChunkSz ( ) const
private

find size of next chunk to allocate (in a hopefully smart way)

Definition at line 232 of file RooLinkedList.cxx.

◆ pop_free_elem()

RooLinkedListElem * RooLinkedListImplDetails::Pool::pop_free_elem ( )

pop a free element out of the pool

Definition at line 165 of file RooLinkedList.cxx.

◆ push_free_elem()

void RooLinkedListImplDetails::Pool::push_free_elem ( RooLinkedListElem el)

push a free element back into the pool

Definition at line 183 of file RooLinkedList.cxx.

◆ release()

bool RooLinkedListImplDetails::Pool::release ( )
inline

release the pool, return true if the pool is unused

Definition at line 134 of file RooLinkedList.cxx.

◆ updateCurSz()

void RooLinkedListImplDetails::Pool::updateCurSz ( Int_t  sz,
Int_t  incr 
)
private

adjust _cursz to current largest block

Definition at line 220 of file RooLinkedList.cxx.

Member Data Documentation

◆ _addrmap

AddrMap RooLinkedListImplDetails::Pool::_addrmap
private

Definition at line 140 of file RooLinkedList.cxx.

◆ _cursz

Int_t RooLinkedListImplDetails::Pool::_cursz
private

Definition at line 143 of file RooLinkedList.cxx.

◆ _freelist

ChunkList RooLinkedListImplDetails::Pool::_freelist
private

Definition at line 141 of file RooLinkedList.cxx.

◆ _refCount

UInt_t RooLinkedListImplDetails::Pool::_refCount
private

Definition at line 144 of file RooLinkedList.cxx.

◆ _szmap

UInt_t RooLinkedListImplDetails::Pool::_szmap[(maxsz - minsz)/szincr]
private

Definition at line 142 of file RooLinkedList.cxx.

  • roofit/roofitcore/src/RooLinkedList.cxx