# OS_CheckHeap

## Syntax

      #include <nitro/os.h>

      long OS_CheckHeap( OSArenaId id, OSHeapHandle heap );

## Arguments

id | Arena ID of the arena that is associated with the heap to be checked.
heap | Handle of the heap to be checked.

## Return Values

A value of -1 is returned if the heap is inconsistent. Otherwise, the function returns the number of bytes that can be used by a free list..

## Description

This function checks the specified heap for debugging. This function is used for debugging.

The arena that is associated with the heap to be checked must be specified. The arena is specified with the arena ID (id). For information on this value see `OS_InitArena`.

## See Also

`OS_InitArena`, `OS_InitAlloc`, `OS_DumpHeap`

## Revision History

2004/01/06 Initial version.

CONFIDENTIAL