This function is identical to the Exec AllocMem call, but will track memory resources for you. When you CloseLibrary(ArpBase), any memory allocated with this function will be freed, which provides a simpler means of termination than is ordinarily found. You may make multiple calls to this routine -- all memory resources will be tracked. Note also that this function requires you to specify the type of memory, so that you may also allocate and track CHIP memory using this function.
INPUTS
Same args as Exec AllocMem request, size / reqs
RESULT
MemPtr -- pointer to the memory requested, same as Exec AllocMem return. If this is NON-ZERO, the memory allocation succeeded. Tracker -- same as all the tracking calls, register A1 contains the pointer to the TRACKER. See ArpAlloc, GetTracker, CreateTaskReslist,FreeTaskReslist. WARNING Do NOT call FreeMem to free the memory from this allocation! If you want to free this allocation before terminating the task, or before calling FreeTaskReslist, you MUST use the TRACKER pointer and use FreeTrackedItem. If you want to manage your own memory, use the exec calls directly.