![]() |
GetApplLimit |
||||
Header: | MacMemory.h | Carbon status: | Supported | |
Returns a pointer to the current application heap limit.
Ptr GetApplLimit ();
A pointer to the current application heap limit.
The Memory Manager expands the application heap only up to the byte preceding this limit.
Nothing prevents the stack from growing below the application limit. If the Operating System detects that the stack has crashed into the heap, it generates a system error. To avoid this, use GetApplLimit and the SetApplLimit function to set the application limit low enough so that a growing stack does not encounter the heap.
Also, note that the GetApplLimit function does not indicate the amount of memory available to your application.
Supported in Carbon. Not available in CarbonLib, but available when InterfaceLib 7.1 or later is installed. Exported by InterfaceLib 7.1 and later.