Classes | Public Types | Public Member Functions | Private Types | Static Private Member Functions | Private Attributes | Friends
utilmm::pools::dynamic_pool Class Reference

#include <dynamic_pool.hh>

List of all members.


struct  item_t

Public Types

typedef boost::uint32_t size_t

Public Member Functions

void * allocate (size_t size)
void deallocate (void *vbuffer)
 dynamic_pool ()
 ~dynamic_pool ()

Private Types

typedef std::vector< item_t * > Buffers
typedef boost::uint8_t byte_t

Static Private Member Functions

static item_tget_base (void *ptr)

Private Attributes

Buffers m_free
Buffers m_listpool
size_t m_size


class dynamic_auto

Detailed Description

A memory_pool is a way to handle allocation and reallocation of fixed-length memory items, but with the ability to change the size at runtime. It is designed to be used for small classes with subclasses

NEVER put the pointer returned by dynamic_pool into an auto_ptr. Use dynamic_ptr instead.

Definition at line 23 of file dynamic_pool.hh.

Member Typedef Documentation

typedef std::vector<item_t*> utilmm::pools::dynamic_pool::Buffers [private]

Definition at line 40 of file dynamic_pool.hh.

typedef boost::uint8_t utilmm::pools::dynamic_pool::byte_t [private]

Definition at line 32 of file dynamic_pool.hh.

typedef boost::uint32_t utilmm::pools::dynamic_pool::size_t

Definition at line 29 of file dynamic_pool.hh.

Constructor & Destructor Documentation

Definition at line 8 of file

Definition at line 9 of file

Member Function Documentation

void * dynamic_pool::allocate ( size_t  size)

Definition at line 18 of file

void dynamic_pool::deallocate ( void *  vbuffer)

Definition at line 43 of file

dynamic_pool::item_t * dynamic_pool::get_base ( void *  ptr) [static, private]

Definition at line 12 of file

Friends And Related Function Documentation

friend class dynamic_auto [friend]

Definition at line 26 of file dynamic_pool.hh.

Member Data Documentation

Definition at line 45 of file dynamic_pool.hh.

Definition at line 45 of file dynamic_pool.hh.

Definition at line 44 of file dynamic_pool.hh.

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

Author(s): Sylvain Joyeux/
autogenerated on Thu Jan 2 2014 11:38:31