# OS_SetCurrentHeap

## C Specification

      #include <nitro/os.h>

      OSHeapHandle OS_SetCurrentHeap( OSArenaId id, OSHeapHandle heap );

## Description

This function sets the current heap. A current heap exists in each arena.

This function only sets the current heap in the specified arena. The arena is specified by an arena ID `id`. For information on this value see `OS_InitArena`.

## Arguments

`id` | The arena ID of the arena in which you will set a current heap.
`heap` | The handle of the heap to set as the current heap.

## Return Values

The handle of the heap that was the previous current heap.

## See Also

`OS_InitArena`, `OS_InitAlloc`, `OS_CreateHeap`

## Revision History

01/06/2004 Initial version