# NNS_FndRecordStateForFrmHeap

## Syntax

      #include <nnsys/fnd.h>

      BOOL NNS_FndRecordStateForFrmHeap(NNSFndHeapHandle heap, u32 tagName);

## Arguments

heap | Frame heap handle.
tagName | Tag name to append to the state record

## Return Values

Returns TRUE if the state was able to be recorded. Returns FALSE if the function is unable to record.

## Description

Records the current memory usage state of the frame heap. It is possible to restore to a recorded memory usage state by calling `NNS_FndFreeByStateToFrmHeap()`.

A tag can be appended to the state record. When appending a tag, set `tagName` to a value other than 0. No tag is added when `tagName` is 0. In addition, even if a tag value that is the same as an existing state record is specified, no error is generated. When tag values that are specified in an argument when using the `NNS_FndFreeByStateToFrmHeap()` function are used in multiple state records, the most recently recorded state record of the state records having the same value is used.

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

## See Also

`NNS_FndFreeByStateToFrmHeap
`

## Revision History

2004/10/15 Added description regarding tags.
2004/04/01 Initial version.

CONFIDENTIAL