Content | |
Memory buffer allocator | |
Vector / matrix buffer allocator | |
Miscellaneous utilities for memory | |
Data Structures | |
struct | default_user_allocator_malloc_free |
Malloc memory allocator. More... | |
struct | user_allocator_aligned_malloc |
Memory allocation for aligned buffers. More... | |
struct | malloc_allocator< L > |
Default memory allocator for vectors and matrixes. More... | |
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... | |
struct arm_cmsis_dsp::default_user_allocator_malloc_free |
Malloc memory allocator.
Static Public Member Functions | |
static char * | malloc (const std::size_t bytes) |
Allocate a buffer. | |
static void | free (char *const block) |
Free a buffer. | |
|
inlinestatic |
Free a buffer.
block | The buffer to free |
|
inlinestatic |
Allocate a buffer.
[in] | bytes | The bytes |
struct arm_cmsis_dsp::user_allocator_aligned_malloc |
Memory allocation for aligned buffers.
Static Public Member Functions | |
static char * | malloc (const size_type bytes) |
Allocate a new buffer. | |
static void | free (char *const block) |
Free a buffer. | |
|
inlinestatic |
Free a buffer.
block | Pointer to the buffer |
|
inlinestatic |
Allocate a new buffer.
[in] | bytes | The bytes |
struct arm_cmsis_dsp::malloc_allocator |
Default memory allocator for vectors and matrixes.
L | Size known at build time in bytes |
Static Public Member Functions | |
static char * | allocate (vector_length_t sz) noexcept |
Allocate a buffer with size known at runtime. | |
static char * | allocate () noexcept |
Allocate a buffer with size known at build time. | |
static void | destroy (char *ptr) noexcept |
Destroys the given pointer. | |
|
inlinestaticnoexcept |
Allocate a buffer with size known at build time.
|
inlinestaticnoexcept |
Allocate a buffer with size known at runtime.
[in] | sz | The size |
|
inlinestaticnoexcept |
Destroys the given pointer.
ptr | The pointer |
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 |