#include <revolution/mem.h> u32 MEMResizeForMBlockExpHeap( MEMHeapHandle heap, void* memBlock, u32 size );
heap |
Expanded heap handle. |
memBlock |
Pointer to the memory block to change the size of. |
size |
Size in bytes to change the memory block to. |
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 the free space is insufficient, 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 reducinng 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.
MEMAllocFromExpHeap, MEMAllocFromExpHeapEx, MEMCreateExpHeap, MEMCreateExpHeapEx
03/01/2006 Initial version.