Skip to content

struct osMemoryPoolAttr_t

Optional attributes passed to osMemoryPoolNew. More...

#include <kernel/cmsis_os2_ext.h>

Public Attributes

Name
const char *name
void *cb_mem
uint32_tcb_size
void *mp_mem
uint32_tmp_size

Detailed Description

cpp
struct osMemoryPoolAttr_t;

Optional attributes passed to osMemoryPoolNew.

All fields are optional. When the storage-providing fields are left at NULL/0, the corresponding memory is allocated from the heap (requires configSUPPORT_DYNAMIC_ALLOCATION == 1). Provide them to keep the pool heap-free — see Example 2 in the group description.

Public Attributes Documentation

variable name

cpp
const char* osMemoryPoolAttr_t::name

Human-readable pool name for debugging; may be NULL.

variable cb_mem

cpp
void* osMemoryPoolAttr_t::cb_mem

User-supplied storage for the pool control block. NULL → allocated from heap.

variable cb_size

cpp
uint32_t osMemoryPoolAttr_t::cb_size

Size in bytes of cb_mem. Must be large enough for the internal control block.

variable mp_mem

cpp
void* osMemoryPoolAttr_t::mp_mem

User-supplied backing buffer for the blocks. NULL → allocated from heap.

variable mp_size

cpp
uint32_t osMemoryPoolAttr_t::mp_size

Size of mp_mem in bytes. Must be ≥ block_count * aligned(block_size).