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


PtrZone

If you have allocated a nonrelocatable block and need to know in which zone it lies, you can use the PtrZone function.

FUNCTION PtrZone (p: Ptr): THz;
p
A pointer to a nonrelocatable block.
DESCRIPTION
The PtrZone function returns a pointer to the heap zone containing the nonrelocatable block pointed to by p.

In case of an error, the result returned by PtrZone is undefined and should be ignored.

ASSEMBLY-LANGUAGE INFORMATION
The registers on entry and exit for PtrZone are
Registers on entry
A0Pointer whose zone is to be found
Registers on exit
A0Pointer to heap zone of nonrelocatable block
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