Description
Returns a memory block back to a memory partition. It is assumed that the user will return the memory block to the same memory partition from which it was allocated.
Files
os.h/os_mem.c
Prototype
Arguments
p_mem
is a pointer to the memory partition control block.
...
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.
Returned Value
None
Required Configuration
OS_CFG_MEM_EN
must be enabled in os_cfg.h. Refer to uC-OS-III Configuration Manual
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.