Emerson PMT1 Manuel D’Utilisation

Page de 128
Monitor:
 Standard Monitor Functions
10002367-02
PmT1 and PmE1 User’s Manual
8-39
Table 8-7:
IsLegal Function Types
If the character string contains legal characters, this function returns TRUE; otherwise, it 
returns FALSE. The string equivalent of the character functions isalpha(), isupper(), 
islower(), and isdigit() can be constructed from this function, which deals with the entire 
string instead of a single character.
MemMng
void *Malloc(NumBytes)
unsigned long NumBytes;
void *Calloc(NumElements, Size)
unsigned long NumElements, Size;
Free(MemLoc)
unsigned long *MemLoc;
CFree(Block)
unsigned long *Block;
void *ReAlloc(Block, NumBytes)
char *Block;
unsigned long NumBytes;
MemReset()
MemAdd(MemAddr, MemSize)
unsigned long MemAddr, MemBSize;
MemStats()
Description:
The memory management functions allocate and free memory from a memory pool. The 
monitor initializes the memory pool to use all on-card memory after the monitor’s bss sec-
tion. If any of the autoboot features are used, the memory pool is not initialized and the 
application program is required to set up the memory pool for these functions.
The functions Malloc, Calloc and ReAlloc allocate memory from the memory pool. Each of 
these functions returns a pointer to the memory requested if the request can be satisfied 
and NULL if there is not enough memory to satisfy the request. The function Malloc accepts 
one argument, NumBytes, indicating the number of bytes requested. The function Calloc 
accepts two arguments, NumElements and Size, indicating a request for a specified number 
of elements of the specified size. The function ReAlloc reallocates a memory block by either 
Type:
Value:
Legal Characters:
DECIMAL
0x8
0 - 9
HEX 
0x4
0 - 9, A - F, a - f
UPPER
0x2
A - Z
LOWER
0x1
a - z
ALPHA
0x3
A - Z, a - z