Important: The information in this document is obsolete and should not be used for new development.
SetApplLimit
Use theSetApplLimit
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
TheSetApplLimit
procedure sets the current application heap limit tozoneLimit
. 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.
You cannot change the limit of zones other than the application heap zone.
- Note
- The
zoneLimit
parameter is not a byte count, but an absolute byte in memory. Thus, you should use theSetApplLimit
procedure only with a value obtained from the Memory Manager functionsGetApplLimit
orApplicationZone
.ASSEMBLY-LANGUAGE INFORMATION
The registers on entry and exit forSetApplLimit
are
Registers on entry A0 Pointer to desired new zone limit
Registers on exit D0 Result code RESULT CODES
noErr 0 No error memFullErr -108 Not enough memory