(C) 1998 AROS - The Amiga Research OS


NAME

void * ArpAllocMem (size , reqs , reqs , , )

LOCATION
In ArpBase at offset 65

SYNOPSIS
ULONG size
ULONG reqs
MemPtr = ArpAlloc( size reqs
d0 (a1D0 / D1

FUNCTION
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.

EXAMPLE
SEE ALSO
ArpAlloc(), GetTracker(), FreeTaskResList()

NOTES

BUGS
None known.

INTERNALS

HISTORY
20.10.1998 hkiel
Amiga Research OS
28.03.1998 bergers
Some new functions.