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 / Manipulating Heap Zones


SetApplLimit

Use the SetApplLimit procedure to set the application heap limit, beyond which the application heap cannot expand.

PROCEDURE SetApplLimit (zoneLimit: Ptr);
zoneLimit
A pointer to a byte in memory demarcating the upper boundary of the application heap zone. The zone can grow to include the byte preceding zoneLimit in memory, but no further.
DESCRIPTION
The SetApplLimit procedure sets the current application heap limit to zoneLimit. The Memory Manager then can expand the application heap only up to the byte preceding the application limit. If the zone already extends beyond the specified limit, the Memory Manager does not cut it back but does prevent it from growing further.

Note
The zoneLimit parameter is not a byte count, but an absolute byte in memory. Thus, you should use the SetApplLimit procedure only with a value obtained from the Memory Manager functions GetApplLimit or ApplicationZone.
You cannot change the limit of zones other than the application heap zone.

ASSEMBLY-LANGUAGE INFORMATION
The registers on entry and exit for SetApplLimit are
Registers on entry
A0Pointer to desired new zone limit
Registers on exit
D0Result code

RESULT CODES
noErr0No error
memFullErr-108Not enough memory

Previous Book Contents Book Index Next

© Apple Computer, Inc.
3 JUL 1996