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


Assessing Memory Conditions

The Memory Manager provides four routines to test how much memory is available, one routine used after memory operations to determine if an error occurred, and one routine to determine the location in memory of the top of your application's partition.

To determine the total amount of free space in the current heap zone or the size of the maximum block that could be obtained after compacting the heap, use the FreeMem and MaxBlock functions, respectively. To determine what those values would be after a purge of the heap zone, call the PurgeSpace procedure. Finally, to find out how much your stack can grow before it collides with the heap, use the StackSpace function.

To find out whether a Memory Manager operation finished successfully, use the MemError function.


Subtopics
FreeMem
FreeMemSys
MaxBlock
MaxBlockSys
PurgeSpace
StackSpace
MemError

Previous Book Contents Book Index Next

© Apple Computer, Inc.
3 JUL 1996