#include <rtl.h>
int _free_box (
void* box_mem, /* Start address of the memory pool */
void* box ); /* Pointer to the block to free */
Description
The _free_box function returns a memory block, which was
allocated using _alloc_box or _calloc_box, back to the
memory pool where it was obtained from.
The box argument specifies the address of the memory block
to be freed.
The box_mem argument specifies the start address of the
memory pool where the block was obtained from.
The _free_box function is in the RL-RTX library. The
prototype is defined in rtl.h.
Note
If you return the memory block to a memory pool that did not
provide the memory block, serious memory errors might occur.
The _free_box function is reentrant and thread-safe. You
can call it from the main function and from an IRQ interrupt
function with no restriction.
Return Value
The _free_box function returns 0 if the memory block was
successfully returned to the memory pool. If there was an error while
freeing the block, it returns 1.
Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers of your data.