#include <fixed_mem_pool.h>
Collaboration diagram for fixed_mem_pool< _Tp >:

Public Types | |
| typedef class_level_lock< fixed_mem_pool< _Tp > >::lock | lock |
Static Public Member Functions | |
| void * | allocate () |
| Allocates a memory block from the memory pool. | |
| void | deallocate (void *) |
| Deallocates a memory block and returns it to the memory pool. | |
| bool | initialize (size_t __size) |
| Initializes the memory pool. | |
| int | deinitialize () |
| Deinitializes the memory pool. | |
| int | get_alloc_count () |
| Gets the allocation count. | |
| bool | is_initialized () |
| Is the memory pool initialized? | |
Static Protected Member Functions | |
| bool | bad_alloc_handler () |
| Bad allocation handler. | |
Please notice that only allocate and deallocate are protected by a lock.
| _Tp | class to use the fixed_mem_pool |
|
|||||
|
|
|
|||||||||
|
Allocates a memory block from the memory pool.
|
|
|||||||||
|
Bad allocation handler.
Called when there are no memory blocks available in the memory pool. If this function returns |
|
||||||||||
|
Deallocates a memory block and returns it to the memory pool.
|
|
|||||||||
|
Deinitializes the memory pool.
|
|
|||||||||
|
Gets the allocation count.
|
|
||||||||||
|
Initializes the memory pool.
|
|
|||||||||
|
Is the memory pool initialized?
|
1.3.9.1