# NNS_FndGetAllocModeForExpHeap

## Syntax

      #include <nnsys/fnd.h>

      u16 NNS_FndGetAllocModeForExpHeap(NNSFndHeapHandle heap);

## Arguments

heap | Extended heap handle

## Return Values

Returns the memory allocation mode of the current extended heap.

## Description

This function obtains the memory allocation mode of the extended heap.

It takes one of the following values for the memory allocation mode:

NNS_FND_EXPHEAP_ALLOC_MODE_FIRST | Allocates a memory block from the first available empty region that is at least the size of the memory block to be allocated.
NNS_FND_EXPHEAP_ALLOC_MODE_NEAR | Searches for the empty region nearest in size to the memory block to be allocated, then allocates the memory block from that empty region.

Immediately after the heap is created, goes into the `NNS_FND_EXPHEAP_ALLOC_MODE_FIRST` state.

## See Also

`NNS_FndSetAllocModeForExpHeap
`

## Revision History

2004/04/01 Initial version.

CONFIDENTIAL