ardour
Public Member Functions | Private Attributes | List of all members
SingleAllocMultiReleasePool Class Reference

#include <pool.h>

Inheritance diagram for SingleAllocMultiReleasePool:
Pool

Public Member Functions

 SingleAllocMultiReleasePool (std::string name, unsigned long item_size, unsigned long nitems)
 
 ~SingleAllocMultiReleasePool ()
 
virtual void * alloc ()
 
virtual void release (void *)
 
- Public Member Functions inherited from Pool
 Pool (std::string name, unsigned long item_size, unsigned long nitems)
 
virtual ~Pool ()
 
std::string name () const
 
guint available () const
 
guint used () const
 
guint total () const
 

Private Attributes

Glib::Threads::Mutex m_lock
 

Additional Inherited Members

- Protected Attributes inherited from Pool
RingBuffer< void * > free_list
 a list of pointers to free items within block More...
 
std::string _name
 

Detailed Description

Definition at line 56 of file pool.h.

Constructor & Destructor Documentation

SingleAllocMultiReleasePool::SingleAllocMultiReleasePool ( std::string  name,
unsigned long  item_size,
unsigned long  nitems 
)

Definition at line 98 of file pool.cc.

SingleAllocMultiReleasePool::~SingleAllocMultiReleasePool ( )

Definition at line 103 of file pool.cc.

Member Function Documentation

void * SingleAllocMultiReleasePool::alloc ( )
virtual

Allocate an item's worth of memory in the Pool by taking one from the free list.

Returns
Pointer to free item.

Reimplemented from Pool.

Definition at line 123 of file pool.cc.

void SingleAllocMultiReleasePool::release ( void *  ptr)
virtual

Release an item's memory by writing its location to the free list

Reimplemented from Pool.

Definition at line 129 of file pool.cc.

Member Data Documentation

Glib::Threads::Mutex SingleAllocMultiReleasePool::m_lock
private

Definition at line 66 of file pool.h.


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