...
If a memory block is available and returned to the application.
OS_ERR_MEM_FULL
If returning a memory block to an already full memory partition. This would indicate that the user freed more blocks that were allocated and potentially did not return some of the memory blocks to the proper memory partition.
OS_ERR_MEM_INVALID_P_BLK
If OS_CFG_ARG_CHK_EN
is set to 1
in DEF_ENABLED
in os_cfg.h
: if the user passed a NULL
pointer for the memory block being returned to the memory partition.
...
If OS_CFG_ARG_CHK_EN
is set to 1
in DEF_ENABLED
in os_cfg.h
: if p_mem
is a NULL
pointer.
OS_ERR_MEM_MEM_FULL
...
_OBJ_TYPE
If OS_CFG_OBJ_TYPE_CHK_EN
is set to DEF_ENABLED
in os_cfg.h
: if the user did not pass a pointer to a memory partition.
Returned Value
...
OS_CFG_MEM_EN
must be enabled in os_cfg.h
. Refer to uCµC-OS-III Configuration Manual.
Callers
Application and ISRs.
Notes/Warnings
- Memory partitions must be created before they are used.
- You must return a memory block to the proper memory partition.You can call this function from an ISR or a task.