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 / Setting Up the Application Heap


MaxApplZone

To help ensure that you can use as much of the application heap zone as possible, call the MaxApplZone procedure. Call this once near the beginning of your program, after you have expanded your stack.

PROCEDURE MaxApplZone;
DESCRIPTION
The MaxApplZone procedure expands the application heap zone to the application heap limit. If you do not call MaxApplZone, the application heap zone grows as necessary to fulfill memory requests. The MaxApplZone procedure does not purge any blocks currently in the zone. If the zone already extends to the limit, MaxApplZone does nothing.

It is a good idea to call MaxApplZone once at the beginning of your program if you intend to maintain an effectively partitioned heap. If you do not call MaxApplZone and then call MoveHHi to move relocatable blocks to the top of the heap zone before locking them, the heap zone could later grow beyond these locked blocks to fulfill a memory request. If the Memory Manager were to allocate a nonrelocatable block in this new space, your heap would be fragmented.

ASSEMBLY-LANGUAGE INFORMATION
The registers on exit for MaxApplZone are
Registers on exit
D0Result code

RESULT CODES
noErr0No error

Previous Book Contents Book Index Next

© Apple Computer, Inc.
3 JUL 1996