POOL Module
Application Program Interface
2-287
The following is the POOL_Obj structure:
typedef struct POOL_Obj {
POOL_Init initFxn; /* Allocator init function */
POOL_Fxns *fxns; /* Interface functions */
Ptr params; /* Setup parameters */
Ptr object; /* Allocator’s object */
} POOL_Obj, *POOL_Handle;
The fields in the POOL_Obj structure are as follows:
One allocator implementation (STATICPOOL) is shipped with
DSP/BIOS. Additional allocator implementations can be created by
application writers.
STATICPOOL
Allocator
The STATICPOOL allocator takes a user-specified buffer and allocates
fixed-size messages from the buffer. The following are its configuration
parameters:
typedef struct STATICPOOL_Params {
Ptr addr;
size_t length;
size_t bufferSize;
} STATICPOOL_Params;
Field
Type
Description
initFxn
POOL_Init
Initialization function for this allocator. This function will be
called during DSP/BIOS initialization. More explicitly it is
called before main().
fxns
POOL_Fxns *
Pointer to the allocator's interface functions.
params
Ptr
Pointer to the allocator's parameters. This field is allocator-
specific. Please see the documentation provided with your
allocator for a description of this field.
object
Ptr
State information needed by the allocator. This field is ini-
tialized and managed by the allocator. See the allocator
documentation to determine how to specify this field.