#include <senf/Utils/pool_alloc_mixin.hh>
This mixin will overload a classes operator new and operator delete so as to make the class use the Boost.Pool memory allocator by default. Using this allocator does however introduce a few restrictions:
class SomeClass : public senf::pool_alloc_mixin<SomeClass> { // ... };
pool_alloc_mixin_tag. This class is accessible via the pool member. Using this member, it is simple to call relevant pool functions, e.g. SomeClass::pool<>::release_memory().Definition at line 67 of file pool_alloc_mixin.hh.
Classes |
|
| struct | pool |
| Templated typedef for the pool used. More... |
|
Static Public Member Functions |
|
| static void * | operator new (size_t size) |
| Operator new utilizing pool allocation. |
|
| static void | operator delete (void *p, size_t size) |
| Operator delete utilizing pool allocation. |
|
| void senf::pool_alloc_mixin< Self >::operator | ||||
| delete | ( | void * | p, | |
| size_t | size | ) | ||
Operator delete utilizing pool allocation.
Definition at line 49 of file pool_alloc_mixin.cti.
| void * senf::pool_alloc_mixin< Self >::operator | ||||
| new | ( | size_t | size | ) |
Operator new utilizing pool allocation.
Definition at line 35 of file pool_alloc_mixin.cti.