MEMRecordStateForFrmHeap

C Specification

#include <revolution/mem.h>

BOOL MEMRecordStateForFrmHeap( 
MEMHeapHandle    heap,
u32              tagName );

Arguments

heap Frame heap handle.
tagName Tag attached to the state record.

Return Values

Returns TRUE if the state was recorded. Otherwise, returns FALSE.

Description

This function records the current memory use state of the frame heap. A memory use state that was recorded can be restored by calling MEMFreeByStateToFrmHeap.

A tag can be attached to the state record. To attach a tag, set tagName to a nonzero value. If tagName is set to zero, no tag is attached. Furthermore, no error results even if the same tag value is specified for an existing state record. When multiple state records have the same tag values specified in the MEMFreeByStateToFrmHeap function, the tag for the most recently recorded state record is used.

Several bytes from the bottom of the available region are used to record the state. The function fails if it cannot allocate memory for recording.

See Also

MEMFreeByStateToFrmHeap

Revision History

03/01/2006 Initial version.