#include <cafe/mem.h>

u32 MEMResizeForMBlockExpHeap(
                    	MEMHeapHandle    heap,
                    	void*            memBlock,
                    	u32              size );


heap Expanded heap handle.
memBlock Pointer to the memory block to be resized.
size Size in bytes of the memory block change.

Return Values

If the function succeeds, returns the size in bytes of the changed memory block. Otherwise, zero is returned.


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

When increasing the current size of the memory block, there must be enough free space after the memory block to increase the size. If there is insufficient available space, the function fails and returns zero. If the size increase of the memory block is successful, the size increase may be greater than the specified size.

When reducing the memory block size, reducing the size may be impossible because a free region is not created when reducing the memory block size by only a few bytes. In this case, the current size of the memory block is returned.

Do Not Call From

Callbacks Do not call this function from any callback function.

See Also


Revision History

2013-05-08 Automated cleanup pass.
2010-11-01 Initial version.