#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.
This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.
ARM websites use two types of cookie: (1) those that enable the site to function and perform as required; and (2) analytical cookies which anonymously track visitors only while using the site. If you are not happy with this use of these cookies please review our Privacy Policy to learn how they can be disabled. By disabling cookies some features of the site will not work.