#include <rtl.h>
#define _declare_box( \
pool, \ /* Name of the memory pool variable. */
size, \ /* Number of bytes in each block. */
cnt ) \ /* Number of blocks in the memory pool. */
U32 pool[((size+3)/4)*(cnt) + 3]
Description
The _declare_box macro declares an array of bytes that can
be used as a memory pool for fixed block allocation.
The argument pool specifies the name of the memory pool
variable, which can be used by the memory block allocation routines.
The argument size specifies the size of the blocks, in bytes.
The argument cnt specifies the number of blocks required in
the memory pool.
The _declare_box macro is part of RL-RTX. The definition is
in rtl.h.
The macro rounds up the value of size to the next
multiple of 4 to give the blocks a 4-byte alignment.
The macro also declares an additional 12 bytes at the start of
the memory pool to store internal pointers and size information
about the memory pool.
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.