#include <dynamic_pool.hh>
Classes | |
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_t * | get_base (void *ptr) |
Private Attributes | |
Buffers | m_free |
Buffers | m_listpool |
size_t | m_size |
Friends | |
class | dynamic_auto |
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.
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.
Definition at line 8 of file dynamic_pool.cc.
Definition at line 9 of file dynamic_pool.cc.
void * dynamic_pool::allocate | ( | size_t | size | ) |
Definition at line 18 of file dynamic_pool.cc.
void dynamic_pool::deallocate | ( | void * | vbuffer | ) |
Definition at line 43 of file dynamic_pool.cc.
dynamic_pool::item_t * dynamic_pool::get_base | ( | void * | ptr | ) | [static, private] |
Definition at line 12 of file dynamic_pool.cc.
friend class dynamic_auto [friend] |
Definition at line 26 of file dynamic_pool.hh.
Buffers utilmm::pools::dynamic_pool::m_free [private] |
Definition at line 45 of file dynamic_pool.hh.
Definition at line 45 of file dynamic_pool.hh.
size_t utilmm::pools::dynamic_pool::m_size [private] |
Definition at line 44 of file dynamic_pool.hh.