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

#include <pool.h>

Inheritance diagram for MultiAllocSingleReleasePool:
Pool

Public Member Functions

 MultiAllocSingleReleasePool (std::string name, unsigned long item_size, unsigned long nitems)
 
 ~MultiAllocSingleReleasePool ()
 
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 70 of file pool.h.

Constructor & Destructor Documentation

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

Definition at line 89 of file pool.cc.

MultiAllocSingleReleasePool::~MultiAllocSingleReleasePool ( )

Definition at line 94 of file pool.cc.

Member Function Documentation

void * MultiAllocSingleReleasePool::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 108 of file pool.cc.

void MultiAllocSingleReleasePool::release ( void *  ptr)
virtual

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

Reimplemented from Pool.

Definition at line 117 of file pool.cc.

Member Data Documentation

Glib::Threads::Mutex MultiAllocSingleReleasePool::m_lock
private

Definition at line 80 of file pool.h.


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