POOL Module
2-286
An application can use multiple allocators. The purpose of having
multiple allocators is to allow an application to regulate its message
usage. For example, an application can allocate critical messages from
one pool of fast on-chip memory and non-critical messages from another
pool of slower external memory.
Figure 2-8.
Allocators and Message Pools
Static Configuration
In order to use an allocator and the POOL module, you must statically
configure the following:
❏
ENABLEPOOL property of the POOL module using Tconf (see
“POOL Manager Properties” on page 2-289)
❏
POOL_config variable in application code (see below)
An application must provide a filled in POOL_config variable if it uses one
or more allocators.
POOL_Config POOL_config;
Where the POOL_Config structure has the following structure:
typedef struct POOL_Config {
POOL_Obj *allocators; /* Array of allocators */
Uint16 numAllocators; /* Num of allocators */
} POOL_Config;
The fields in this structure are as follows:
If the POOL module is enabled via Tconf and the application does not
provide the POOL_config variable, the application cannot be linked
successfully.
M SG Q APIs
Allocator0
AllocatorN
M sg Pool
M essage Pool
M essage Pool
. . .
Transports
Field
Type
Description
allocators
POOL_Obj
Array of allocator objects
numAllocators
Uint16
Number of allocators in the allocator array.