MEMSetAllocModeForExpHeap

Syntax

#include <cafe/mem.h>

u16 MEMSetAllocModeForExpHeap( MEMHeapHandle heap, u16 mode );

Parameters

heap Expanded heap handle.
mode Memory allocation mode (see description below).

Return Values

Returns the memory allocation mode of the current expanded heap before configuration.

Description

This function sets the memory allocation mode of the expanded heap.

The memory allocation mode is specified with mode.

MEM_EXPHEAP_ALLOC_MODE_FIRST Allocates a memory block from the first free region that is at least the size of the memory block to allocate.
MEM_EXPHEAP_ALLOC_MODE_NEAR Searches for a free region nearest in size to the memory block to allocate, then allocates the memory block from this free region.

Immediately after the heap is created, the MEM_EXPHEAP_ALLOC_MODE_FIRST state is entered.

Do Not Call From

Callbacks Do not call this function from any callback function.

See Also

MEMGetAllocModeForExpHeap

Revision History

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


CONFIDENTIAL