#include <mempool.h>
Inheritance diagram for MemoryPooled:
Public Methods | |
MemoryPooled () | |
~MemoryPooled () | |
Static Public Methods | |
void * | operator new (size_t size) |
Allocate a single object. More... | |
void | operator delete (void *dead, size_t size) |
Recycle a single object. More... | |
int | FreeBlocks () |
Static Private Methods | |
MemoryPooled< T > * | allocate_block () |
Utility function. More... | |
Static Private Attributes | |
const int | BLOCK_SIZE |
MemoryPooled< T > * | freelist |
Allocates chunks of BLOCK_SIZE objects at a time, then gives them out and recycles them.
Definition at line 38 of file mempool.h.
|
|
|
|
|
Utility function.
Definition at line 85 of file mempool.h. References MemoryPooled< T >::BLOCK_SIZE, and MemoryPooled< T >::next. Referenced by MemoryPooled< T >::operator new(). |
|
Definition at line 117 of file mempool.h. References MemoryPooled< T >::freelist, and MemoryPooled< T >::next. |
|
Recycle a single object.
Definition at line 100 of file mempool.h. References MemoryPooled< T >::freelist, and MemoryPooled< T >::next. |
|
Allocate a single object.
Definition at line 64 of file mempool.h. References MemoryPooled< T >::allocate_block(), MemoryPooled< T >::BLOCK_SIZE, MemoryPooled< T >::freelist, and MemoryPooled< T >::next. |
|
Definition at line 57 of file mempool.h. Referenced by MemoryPooled< T >::allocate_block(), and MemoryPooled< T >::operator new(). |
|
|
|
Definition at line 59 of file mempool.h. Referenced by MemoryPooled< T >::FreeBlocks(), MemoryPooled< T >::operator delete(), and MemoryPooled< T >::operator new(). |
|
Definition at line 52 of file mempool.h. Referenced by MemoryPooled< T >::allocate_block(), MemoryPooled< T >::FreeBlocks(), MemoryPooled< T >::operator delete(), and MemoryPooled< T >::operator new(). |