spot 2.15.1
Loading...
Searching...
No Matches
Classes | Public Member Functions | List of all members
spot::fixed_size_pool< Kind > Class Template Reference

A fixed-size memory pool implementation. More...

#include <spot/misc/fixpool.hh>

Inheritance diagram for spot::fixed_size_pool< Kind >:
Collaboration diagram for spot::fixed_size_pool< Kind >:

Public Member Functions

 fixed_size_pool (size_t size)
 Create a pool allocating objects of size bytes.
 
 ~fixed_size_pool ()
 Free any memory allocated by this pool.
 
void * allocate ()
 Allocate size bytes of memory.
 
void deallocate (void *ptr)
 Recycle size bytes of memory.
 

Detailed Description

template<pool_type Kind>
class spot::fixed_size_pool< Kind >

A fixed-size memory pool implementation.

Constructor & Destructor Documentation

◆ fixed_size_pool()

template<pool_type Kind>
spot::fixed_size_pool< Kind >::fixed_size_pool ( size_t  size)
inline

Create a pool allocating objects of size bytes.

◆ ~fixed_size_pool()

template<pool_type Kind>
spot::fixed_size_pool< Kind >::~fixed_size_pool ( )
inline

Free any memory allocated by this pool.

Member Function Documentation

◆ allocate()

template<pool_type Kind>
void * spot::fixed_size_pool< Kind >::allocate ( )
inline

Allocate size bytes of memory.


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

Please direct any question, comment, or bug report to the Spot mailing list at spot@lrde.epita.fr.
Generated on Fri Feb 27 2015 10:00:07 for spot by doxygen 1.9.8