Carbon


NewPtrSysClear

Header: MacMemory.h Carbon status: Unsupported

Allocates a nonrelocatable block of a specified size in the system heap with all its bytes set to 0.

Ptr NewPtrSysClear (
    Size byteCount
);
byteCount

The requested size (in bytes) of the nonrelocatable block.

function result

A pointer to the new block. If NewPtrSysClear fails to allocate a block of the requested size, it returns NULL.

DISCUSSION

The NewPtrSysClear function works much as the NewPtr function does, but attempts to allocate the requested block in the system heap zone instead of in the current heap zone. Also, it sets all bytes in the new block to 0 instead of leaving the contents of the block undefined.

Because NewPtrSysClear allocates memory, you should not call it at interrupt time.

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

AVAILABILITY

Not supported in Carbon. Not available in CarbonLib, but available when InterfaceLib 7.1 or later is installed. Exported by InterfaceLib 7.1 and later.


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