Logo ROOT  
Reference Guide
RooLinkedListImplDetails::Pool Class Reference

Definition at line 114 of file RooLinkedList.cxx.

Public Member Functions

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

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 More...
typedef std::list< Chunk * > ChunkList

Private Member Functions

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

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

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

Definition at line 123 of file RooLinkedList.cxx.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum

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


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


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

Definition at line 116 of file RooLinkedList.cxx.

Constructor & Destructor Documentation

◆ Pool()

RooLinkedListImplDetails::Pool::Pool ( )


Definition at line 151 of file RooLinkedList.cxx.

◆ ~Pool()

RooLinkedListImplDetails::Pool::~Pool ( )


Definition at line 156 of file RooLinkedList.cxx.

Member Function Documentation

◆ acquire()

void RooLinkedListImplDetails::Pool::acquire ( )

acquire the pool

Definition at line 131 of file RooLinkedList.cxx.

◆ nextChunkSz()

Int_t RooLinkedListImplDetails::Pool::nextChunkSz ( ) const

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 ( )

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 

adjust _cursz to current largest block

Definition at line 219 of file RooLinkedList.cxx.

Member Data Documentation

◆ _addrmap

AddrMap RooLinkedListImplDetails::Pool::_addrmap

Definition at line 139 of file RooLinkedList.cxx.

◆ _cursz

Int_t RooLinkedListImplDetails::Pool::_cursz

Definition at line 142 of file RooLinkedList.cxx.

◆ _freelist

ChunkList RooLinkedListImplDetails::Pool::_freelist

Definition at line 140 of file RooLinkedList.cxx.

◆ _refCount

UInt_t RooLinkedListImplDetails::Pool::_refCount

Definition at line 143 of file RooLinkedList.cxx.

◆ _szmap

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

Definition at line 141 of file RooLinkedList.cxx.

The documentation for this class was generated from the following file: