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 1 - Introduction to Memory Management / Memory Management Reference
Memory Management Routines / Grow-Zone Operations


SetGrowZone

To specify a grow-zone function for the current heap zone, pass a pointer to that function to the SetGrowZone procedure. Ordinarily, you call this procedure early in the execution of your application.

If you initialize your own heap zones besides the application and system zones, you can alternatively specify a grow-zone function as a parameter to the InitZone procedure.

PROCEDURE SetGrowZone (growZone: ProcPtr);
growZone
A pointer to the grow-zone function.
DESCRIPTION
The SetGrowZone procedure sets the current heap zone's grow-zone function as designated by the growZone parameter. A NIL parameter value removes any grow-zone function the zone might previously have had.

The Memory Manager calls the grow-zone function only after exhausting all other avenues of satisfying a memory request, including compacting the zone, increasing its size (if it is the original application zone and is not yet at its maximum size), and purging blocks from it.

See "Grow-Zone Functions" on page 1-80 for a complete description of a grow-zone function.

ASSEMBLY-LANGUAGE INFORMATION
The registers on entry and exit for SetGrowZone are
Registers on entry
A0Pointer to new grow-zone function
Registers on exit
D0Result code

RESULT CODES
noErr0No error
SEE ALSO
See "Defining a Grow-Zone Function" on page 1-48 for a description of a grow-zone function.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
3 JUL 1996