HandleZone
If you need to know which heap zone contains a particular relocatable block, you can use the HandleZone function.
FUNCTION HandleZone (h: Handle): THz;
h
- A handle to a relocatable block.
DESCRIPTION
The HandleZone function returns a pointer to the heap zone containing the relocatable block whose handle is h. In case of an error, the result returned by HandleZone is undefined and should be ignored.
- IMPORTANT
- If the handle
h is empty (that is, if it points to a NIL master pointer), HandleZone returns a pointer to the heap zone that contains the master pointer.
ASSEMBLY-LANGUAGE INFORMATION
The registers on entry and exit for HandleZone are
| Registers on entry |
| A0 | Handle whose zone is to be found |
| Registers on exit |
| A0 | Pointer to handle's heap zone |
| D0 | Result code |
RESULT CODES
| noErr | 0 | No error |
| memWZErr | -111 | Attempt to operate on a free block |