CMSIS-RTOS2  Version 2.1.3
Real-Time Operating System: API and RTX Reference Implementation
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Memory Functions

Events generated memory functions. More...

Functions

void EvrRtxMemoryInit (void *mem, uint32_t size, uint32_t result)
 Event on memory initialization (Op) More...
 
void EvrRtxMemoryAlloc (void *mem, uint32_t size, uint32_t type, void *block)
 Event on memory allocate (Op) More...
 
void EvrRtxMemoryFree (void *mem, void *block, uint32_t result)
 Event on memory free (Op) More...
 
void EvrRtxMemoryBlockInit (osRtxMpInfo_t *mp_info, uint32_t block_count, uint32_t block_size, void *block_mem)
 Event on memory block initialization (Op) More...
 
void EvrRtxMemoryBlockAlloc (osRtxMpInfo_t *mp_info, void *block)
 Event on memory block alloc (Op) More...
 
void EvrRtxMemoryBlockFree (osRtxMpInfo_t *mp_info, void *block, int32_t status)
 Event on memory block free (Op) More...
 

Description

Function Documentation

void EvrRtxMemoryInit ( void *  mem,
uint32_t  size,
uint32_t  result 
)
Parameters
[in]mempointer to memory pool.
[in]sizesize of a memory pool in bytes.
[in]resultexecution status: 1 - success, 0 - failure.

The event MemoryInit is generated when initialization of a variable size memory block completes.

Value in the Event Recorder shows:

  • mem : memory address of memory pool.
  • size : size of a memory pool in bytes.
  • result : execution status: 1 - success, 0 - failure.
void EvrRtxMemoryAlloc ( void *  mem,
uint32_t  size,
uint32_t  type,
void *  block 
)
Parameters
[in]mempointer to memory pool.
[in]sizesize of a memory block in bytes.
[in]typememory block type: 0 - generic, 1 - control block.
[in]blockpointer to allocated memory block or NULL in case of no memory is available.

The event MemoryAlloc is generated when allocation of a variable size memory block completes.

Value in the Event Recorder shows:

  • mem : memory address of memory pool.
  • size : size of a memory block in bytes.
  • type : memory block type: 0 - generic, 1 - control block
  • block : memory address of allocated memory block or 0 in case of no memory is available.
void EvrRtxMemoryFree ( void *  mem,
void *  block,
uint32_t  result 
)
Parameters
[in]mempointer to memory pool.
[in]blockmemory block to be returned to the memory pool.
[in]resultexecution status: 1 - success, 0 - failure.

The event MemoryFree is generated when deallocation of a variable size memory block completes.

Value in the Event Recorder shows:

  • mem : memory address of memory pool.
  • block : memory address of block to be returned to the memory pool.
  • result : execution status: 1 - success, 0 - failure.
void EvrRtxMemoryBlockInit ( osRtxMpInfo_t mp_info,
uint32_t  block_count,
uint32_t  block_size,
void *  block_mem 
)
Parameters
[in]mp_infomemory pool info.
[in]block_countmaximum number of memory blocks in memory pool.
[in]block_sizesize of a memory block in bytes.
[in]block_mempointer to memory for block storage.

The event MemoryBlockInit is generated when initialization of a fixed size memory block completes.

Value in the Event Recorder shows:

  • mp_info : memory address of memory pool info.
  • block_count : maximum number of memory blocks in memory pool.
  • block_size : size of a memory block in bytes.
  • block_mem : memory address of memory for block storage.
void EvrRtxMemoryBlockAlloc ( osRtxMpInfo_t mp_info,
void *  block 
)
Parameters
[in]mp_infomemory pool info.
[in]blockaddress of the allocated memory block or NULL in case of no memory is available.

The event MemoryBlockAlloc is generated when allocation of a fixed size memory block completes.

Value in the Event Recorder shows:

  • mp_info : memory address of memory pool info.
  • block : memory address of the allocated memory block or 0 in case of no memory is available.
void EvrRtxMemoryBlockFree ( osRtxMpInfo_t mp_info,
void *  block,
int32_t  status 
)
Parameters
[in]mp_infomemory pool info.
[in]blockaddress of the allocated memory block to be returned to the memory pool.
[in]statusextended execution status.

The event MemoryBlockFree is generated when deallocation of a fixed size memory block completes.

Value in the Event Recorder shows:

  • mp_info : memory address of memory pool info.
  • block : memory address of the allocated memory block to be returned to the memory pool.
  • status : execution status osStatus_t