Carbon


FreeMem

Header: MacMemory.h Carbon status: Supported

Returns the total amount of free space in the current heap zone.

SInt32 FreeMem ();
function result

Total amount of free space, in bytes, in the current heap zone. Note that usually you cannot allocate a block of that size, because of heap fragmentation due to nonrelocatable or locked blocks.0

DISCUSSION

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

Even though FreeMem does not move or purge memory, you should not call it at interrupt time because the heap might be in an inconsistent state.

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)