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

Definition at line 114 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 124 of file RooLinkedList.cxx.

◆ Chunk

a chunk of memory in the pool

Definition at line 122 of file RooLinkedList.cxx.

◆ ChunkList

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

Definition at line 123 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 116 of file RooLinkedList.cxx.

Constructor & Destructor Documentation

◆ Pool()

RooLinkedListImplDetails::Pool::Pool ( )

constructor

Definition at line 151 of file RooLinkedList.cxx.

◆ ~Pool()

RooLinkedListImplDetails::Pool::~Pool ( )

destructor

Definition at line 156 of file RooLinkedList.cxx.

Member Function Documentation

◆ acquire()

void RooLinkedListImplDetails::Pool::acquire ( )
inline

acquire the pool

Definition at line 131 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 231 of file RooLinkedList.cxx.

◆ pop_free_elem()

RooLinkedListElem * RooLinkedListImplDetails::Pool::pop_free_elem ( )

pop a free element out of the pool

Definition at line 164 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 182 of file RooLinkedList.cxx.

◆ release()

bool RooLinkedListImplDetails::Pool::release ( )
inline

release the pool, return true if the pool is unused

Definition at line 133 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 219 of file RooLinkedList.cxx.

Member Data Documentation

◆ _addrmap

AddrMap RooLinkedListImplDetails::Pool::_addrmap
private

Definition at line 139 of file RooLinkedList.cxx.

◆ _cursz

Int_t RooLinkedListImplDetails::Pool::_cursz
private

Definition at line 142 of file RooLinkedList.cxx.

◆ _freelist

ChunkList RooLinkedListImplDetails::Pool::_freelist
private

Definition at line 140 of file RooLinkedList.cxx.

◆ _refCount

UInt_t RooLinkedListImplDetails::Pool::_refCount
private

Definition at line 143 of file RooLinkedList.cxx.

◆ _szmap

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

Definition at line 141 of file RooLinkedList.cxx.

  • roofit/roofitcore/src/RooLinkedList.cxx