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


GetApplLimit

Use the GetApplLimit function to get the application heap limit, beyond which the application heap cannot expand.

FUNCTION GetApplLimit: Ptr;
DESCRIPTION
The GetApplLimit function returns 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 procedure to set the application limit low enough so that a growing stack does not encounter the heap.

Note
The GetApplLimit function does not indicate the amount of memory available to your application.
ASSEMBLY-LANGUAGE INFORMATION
The global variable ApplLimit contains the current application heap limit.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
3 JUL 1996