MaxMemSys
MaxMem
Compact heap; return free space and max growth Size *growBytes ; receives maximum bytes the heap can grow returns size, in bytes, of largest contiguous free block
MaxMem compacts the heap, purging all purgeable blocks from the current
heap zone. It returns the size of the largest contiguous block available after
compaction and the maximum amount by which the heap can grow. It does not
attempt to grow the heap.
growBytes is the address of a 32-bit long. Upon return, it will contain the
maximum amount by that the current heap could grow.
Returns: a 32-bit long; the largest contiguous free block in the current heap.
Notes: There is another routine, MaxMemSys, which performs the equivalent operation to MaxMem, but in the System heap zone. It takes the same
parameters as MaxMem.
MaxMem performs compaction but does not attempt to grow the heap. Use
MaxBlock to get the same return value without actually compacting the
heap (which would be done anyway when you allocate a large block).
The growBytes parameter will be 0 for all heap zones except the application heap (see InitZone). It might be 0 for the application heap, if that zone has already grown to its maximum. Note that this returned value
does not take into consideration any purging which could be performed by a
available following a general purge.