MEM_increaseTableSize
2-224
C Interface
Syntax
status = MEM_increaseTableSize(numEntries);
Parameters
Uns
numEntries; /* number of segments to increase table by */
Return Value
Int
status;
/* TRUE if successful */
Reentrant
yes
Description
MEM_increaseTableSize allocates numEntries of undefined memory
segments. When MEM_define is called, undefined memory segments
are re-used. If no undefined memory segments exist, one is allocated. By
using MEM_increaseTableSize, the application can avoid the use of
MEM_alloc (thus improving performance and determinism) within the
MEM_define call.
MEM_increaseTableSize internally locks 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_increaseTableSize 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.
MEM_increaseTableSize returns SYS_OK to indicate success and
SYS_EALLOC if an allocation error occurred.
Constraints and
Calling Context
❏
Do not call from the context of a SWI or HWI.
See Also
MEM_increaseTableSize
Increase the internal MEM table size