# OS_CheckHeap

## C Specification

      #include <nitro/os.h>

      long OS_CheckHeap( OSArenaId id, OSHeapHandle heap );

## Description

This function checks the specified heap for debugging. The arena that is associated with the heap to be checked must be specified. The arena is specified by an arena ID, `id`. For information on this value see `OS_InitArena`.

## 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.

## See Also

`OS_InitArena`, `OS_InitAlloc`, `OS_DumpHeap`

## Revision History

01/06/2004 Initial version