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


MaxBlock

Use the MaxBlock function to determine the size of the largest block you could allocate in the current heap zone after a compaction.

FUNCTION MaxBlock: LongInt;
DESCRIPTION
The MaxBlock function returns the maximum contiguous space, in bytes, that you could obtain after compacting the current heap zone. MaxBlock does not actually do the compaction.

ASSEMBLY-LANGUAGE INFORMATION
The registers on exit for MaxBlock are
Registers on exit
D0Size of largest allocatable block

If you want to know the size of the largest allocatable block in the system heap zone, rather than in the current heap zone, set bit 10 of the routine trap word. In most development systems, you can do this by supplying the word SYS as the second argument to the routine macro, as follows:

_MaxBlock ,SYS
RESULT CODES
noErr 0No error

Previous Book Contents Book Index Next

© Apple Computer, Inc.
3 JUL 1996