MEM_redefine
Application Program Interface
2-225
C Interface
Syntax
MEM_redefine(segid, base, length);
Parameters
Int
segid;
/* segment to redefine */
Ptr
base;
/* base address of new block */
MEM_sizep length;
/* length (in MADUs) of new block */
Return Value
Void
Reentrant
yes
Description
MEM_redefine redefines an existing memory segment managed by the
DSP/BIOS MEM Module. All pointers in the old segment memory block
are automatically freed, and the new segment block is completely
available for allocations.
The new block should be aligned on a MEM_HEADERSIZE boundary,
and the length should be a multiple of MEM_HEADERSIZE.
Constraints and
Calling Context
❏
MEM_redefine internally locks the memory by calling LCK_pend and
LCK_post. If another task already holds a lock to the memory, there
is a context switch. For this reason, MEM_redefine cannot be called
from the context of a SWI or HWI. It can be called from main() or a
TSK. The duration that the API holds the memory lock is variable.
❏
The length parameter must be a multiple of MEM_HEADERSIZE and
must be at least equal to MEM_HEADERSIZE.
❏
The base Ptr cannot be NULL.
See Also
MEM_redefine
Redefine an existing memory segment