Data Structures | |
| struct | ListElem |
| Simple list of elements. More... | |
| class | MemoryPool< BUF_SIZE, UserAllocator > |
| This class describes a memory pool that can be used to build a memory allocator for vectors and matrixes. More... | |
Miscellaneous utilities for implementing memory allocators
| struct arm_cmsis_dsp::ListElem |
Simple list of elements.
| class arm_cmsis_dsp::MemoryPool |
This class describes a memory pool that can be used to build a memory allocator for vectors and matrixes.
| BUF_SIZE | Size of a buffer known at build time |
| UserAllocator | Memory allocator to allocate the memory buffer |
Public Member Functions | |
| MemoryPool (const uint16_t nbBufs) | |
| Create a new memory pool. | |
| ~MemoryPool () | |
| Destroys the object. | |
| char * | get_new_buffer () noexcept |
| Gets the new free buffer. | |
| void | recycle_buffer (char *buf) noexcept |
| Release the buffer so that it can be reused. | |
| void | reset () noexcept |
| Release all the buffers so that they can be reused. | |
|
inlineexplicit |
Create a new memory pool.
| [in] | nbBufs | The number of buffers to pre-allocate |
|
inlinenoexcept |
Gets the new free buffer.
|
inlinenoexcept |
Release the buffer so that it can be reused.
| buf | The buffer |