reSIProcate
SIP stack, Dialog Usage Manager and related libraries
Loading...
Searching...
No Matches
resip::DinkyPool< S > Class Template Reference

A dirt-simple lightweight pool allocator meant for use in short-lifetime objects. More...

#include <DinkyPool.hxx>

Inheritance diagram for resip::DinkyPool< S >:
[legend]

Public Member Functions

 DinkyPool ()
 
 ~DinkyPool ()
 
void * allocate (size_t size)
 
void deallocate (void *ptr)
 
size_t max_size () const
 
size_t getHeapBytes () const
 
size_t getPoolBytes () const
 
size_t getPoolSizeBytes () const
 
- Public Member Functions inherited from resip::PoolBase
virtual ~PoolBase ()
 

Detailed Description

template<unsigned int S>
class resip::DinkyPool< S >

A dirt-simple lightweight pool allocator meant for use in short-lifetime objects.

This will pool-allocate at most S bytes, after which no further pool allocation will be performed, and fallback to the system new/delete will be used (deallocating a pool allocated object will not free up room in the pool; the memory will be freed when the DinkyPool goes away).

Definition at line 20 of file DinkyPool.hxx.

Constructor & Destructor Documentation

◆ DinkyPool()

template<unsigned int S>
resip::DinkyPool< S >::DinkyPool ( )
inline

Definition at line 23 of file DinkyPool.hxx.

◆ ~DinkyPool()

template<unsigned int S>
resip::DinkyPool< S >::~DinkyPool ( )
inline

Definition at line 24 of file DinkyPool.hxx.

Member Function Documentation

◆ allocate()

template<unsigned int S>
void * resip::DinkyPool< S >::allocate ( size_t  size)
inlinevirtual

Implements resip::PoolBase.

Definition at line 26 of file DinkyPool.hxx.

◆ deallocate()

template<unsigned int S>
void resip::DinkyPool< S >::deallocate ( void *  ptr)
inlinevirtual

Implements resip::PoolBase.

Definition at line 38 of file DinkyPool.hxx.

◆ getHeapBytes()

template<unsigned int S>
size_t resip::DinkyPool< S >::getHeapBytes ( ) const
inline

Definition at line 52 of file DinkyPool.hxx.

◆ getPoolBytes()

template<unsigned int S>
size_t resip::DinkyPool< S >::getPoolBytes ( ) const
inline

Definition at line 53 of file DinkyPool.hxx.

◆ getPoolSizeBytes()

template<unsigned int S>
size_t resip::DinkyPool< S >::getPoolSizeBytes ( ) const
inline

Definition at line 54 of file DinkyPool.hxx.

◆ max_size()

template<unsigned int S>
size_t resip::DinkyPool< S >::max_size ( ) const
inlinevirtual

Implements resip::PoolBase.

Definition at line 47 of file DinkyPool.hxx.


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