HeapPtrToHandle.hsf 969 B

1234567891011121314151617181920212223242526
  1. [Main]
  2. Name=HeapPtrToHandle
  3. Type=Function
  4. Subtype=ROM Call
  5. Header Files=alloc.h
  6. Definition=HANDLE HeapPtrToHandle (void *Ptr);
  7. See Also=alloc.h/PtrToHandle
  8. [ROM Call]
  9. Index=$23A
  10. [Description]
  11. Determines the handle associated with a block.
  12. [Explanation]
  13. HeapPtrToHandle returns the handle associated to the block whose beginning is
  14. pointed to by <I>Ptr</I> (or <A HREF="$$LINK(alloc.h/H_NULL)">H_NULL</A> if <I>Ptr</I>
  15. does not point to the beginning of a block).
  16. <BR>
  17. This routine works by searching the entire table of handles for the given pointer.
  18. It will return meaningful results only if the block of memory was not moved (e.g. by heap
  19. compression) since the pointer was originally obtained.
  20. <BR>
  21. <B>Note:</B> <A HREF="$$LINK(alloc.h/PtrToHandle)">PtrToHandle</A>, implemented in the
  22. TIGCC library, returns the handle associated to the block referenced by the pointer,
  23. even if the pointer does not point to the beginning of the block.