Legacy Documentclose button

Important: The information in this document is obsolete and should not be used for new development.

Previous Book Contents Book Index Next

Inside Macintosh: Memory /
Chapter 2 - Memory Manager / Memory Manager Reference
Memory Manager Routines / Accessing Heap Zones


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
A0Handle whose zone is to be found
Registers on exit
A0Pointer to handle's heap zone
D0Result code

RESULT CODES
noErr0No error
memWZErr-111Attempt to operate on a free block

Previous Book Contents Book Index Next

© Apple Computer, Inc.
3 JUL 1996