FreeEntry(memList)
void FreeEntry(struct MemList *);
This function takes a MemList structure, as returned by
AllocEntry(), frees all the MemEntry structures first and finally the MemList structure itself.
The
AllocEntry() function never returns NULL and instead indicates memory allocation failure by setting bit #31 of the result it returns. Never call FreeEntry() on the result of
AllocEntry() unless you have verified that the result is a valid pointer, like so:
if ((((ULONG)memList) & 0x80000000) != 0 && memList != NULL)
FreeEntry(memList);