# NNS_FndResizeForMBlockExpHeap

## Syntax

      #include <nnsys/fnd.h>

      u32 NNS_FndResizeForMBlockExpHeap(
              NNSFndHeapHandle    heap,
              void*               memBlock,
              u32                 size);

## Arguments

heap | Expanded heap handle
memBlock | Pointer to the memory block which changes size.
size | Size (in bytes) of the changed memory block.

## Return Values

Returns the size (in bytes) of the changed memory block if the function succeeds. 0 is returned if the function doesn't succeed.

## Description

Changes the size of the memory block allocated from the extended heap.

When making the memory block larger than the current size, there must be sufficient empty space for expansion at the end of the memory block. If there is insufficient empty space, the function will fail and 0 will be returned. If the size of the memory block is successfully increased, the size may be larger than desired.

When making the memory block smaller than the current size, a small size discrepancy may occur due to an inability to create the empty space and perform compression. In such cases, the size of the current memory block will be returned.

## See Also

`NNS_FndAllocFromExpHeap`, `NNS_FndAllocFromExpHeapEx`, `NNS_FndCreateExpHeap`, `NNS_FndCreateExpHeapEx`

## Revision History

2004/10/15 Corrected the heading of "See Also."
2004/04/01 Initial version.

CONFIDENTIAL