OS_CheckStatisticsBuffer

Syntax

#include <nitro/os.h>

BOOL OS_CheckStatisticsBuffer( void* statBuf );

Arguments

statBuf Function cost statistics buffer

Return Values

Returns FALSE if the highest-order position of the buffer is overwritten.
Otherwise, returns TRUE.

Description

Checks whether the highest-order position of the function cost statistics buffer has been overwritten.
That is, it checks whether the function cost statistics buffer is full.

The function cost statistics buffer collects data such as function call count and running time based on the function cost calculation buffer information. The buffer is consumed as the number of collected functions increase. However, once the buffer is full, it will simply stop recording function calls. It will not display error messages or stop programs.

The mechanism for detecting the full buffer is as follows. Write a check code to the highest-order position of the buffer. Check whether this code is overwritten by another value. A different value written here indicates a high probability that the buffer was used up to that point. However, this only indicates the use of this region; it does not give the time at which the use occurred.

The check code is written at the initialization of the statistics buffer by OS_InitStatistics().

This is a debug function, so in the final ROM version (FINALROM), it will simply return TRUE.

For checking the function cost calculation buffer as opposed to the statistics buffer, OS_CheckFunctionCostBuffer() is available.

See Also

OS_InitStatistics, OS_CheckFunctionCostBuffer

Revision History

2007/12/26 Corrected errors.
2006/08/24 Initial version.


CONFIDENTIAL