[Main] Name=HeapPtrToHandle Type=Function Subtype=ROM Call Header Files=alloc.h Definition=HANDLE HeapPtrToHandle (void *Ptr); See Also=alloc.h/PtrToHandle [ROM Call] Index=$23A [Description] Determines the handle associated with a block. [Explanation] HeapPtrToHandle returns the handle associated to the block whose beginning is pointed to by Ptr (or H_NULL if Ptr does not point to the beginning of a block).
This routine works by searching the entire table of handles for the given pointer. It will return meaningful results only if the block of memory was not moved (e.g. by heap compression) since the pointer was originally obtained.
Note: PtrToHandle, implemented in the TIGCC library, returns the handle associated to the block referenced by the pointer, even if the pointer does not point to the beginning of the block.