Important: The information in this document is obsolete and should not be used for new development.
MaxBlock
Use theMaxBlock
function to determine the size of the largest block you could allocate in the current heap zone after a compaction.
FUNCTION MaxBlock: LongInt;DESCRIPTION
TheMaxBlock
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 forMaxBlock
are
Registers on exit D0 Size 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 ,SYSRESULT CODES
noErr 0 No error