Carbon


MaxMem

Header: MacMemory.h Carbon status: Supported

Compacts and purges the current heap zone.

Size MaxMem (
    Size *grow
);
grow

On return, the maximum number of bytes by which the current heap zone can grow. After a call to MaxApplZone, MaxMem always sets this parameter to 0.

function result

The size, in bytes, of the largest contiguous free block in the zone after the compacting and purging.0

DISCUSSION

The MaxMem function compacts the current heap zone and purges all relocatable, unlocked, and purgeable blocks from the zone. If the current zone is the original application zone, the grow parameter is set to the maximum number of bytes by which the zone can grow. For any other heap zone, grow is set to 0. MaxMem does not actually expand the zone or call the zone’s grow-zone function.

Call the function MemError to get the result code. See “Result Codes”.

Because MaxMem moves and purges memory, you should not call it at interrupt time.

AVAILABILITY

Supported in Carbon. Available in CarbonLib 1.0 and later when InterfaceLib 7.1 or later is installed. Exported by CarbonLib 1.0 and later and by InterfaceLib 7.1 and later.


© 2000 Apple Computer, Inc. — (Last Updated 4/6/2000)