Synopsis
PDX_BOOL ugn_GetMemory(long opt, int ccnt, int tol, int icnt, int size, int *mcnt, void *madd)
Purpose
Allocate memory.
Description
Routine to allocate some memory based on the amount currently allocated. It will re-allocate space when the current count is within the tolerance of the memory count.
Input
opt
UGN_MALLOC
Allocate with malloc
UGN_CALLOC
Allocate with calloc
ccnt
Current count of elements loaded in storage.
tol
Number of elements less than mcnt, that must be loaded in storage before re-allocation is done.
icnt
Number of elements to increment allocation for.
size
Size of element to be allocated - in bytes.
Output
mcnt
Current count of elements allocated
madd
Pointer to address pointer for allocated memory.
Return
PDX_TRUE or PDX_TRUE