1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2<HTML>
3
4<HEAD>
5<META http-equiv="Content-Type" content="text/html; charset=windows-1252">
6<META http-equiv="Content-Style-Type" content="text/css">
7<META name="GENERATOR" content="IBM WebSphere Studio Homepage Builder Version 8.0.0.0 for Windows">
8
9<LINK rel="stylesheet" type="text/css" href="../../CSS/revolution.css">
10
11	<TITLE>MEMSetAllocModeForExpHeap</TITLE>
12
13</HEAD>
14
15
16<BODY>
17
18
19<H1>MEMSetAllocModeForExpHeap</H1>
20
21<H2>Syntax</H2>
22<DL><DD><PRE class="construction">
23#include &lt;revolution/mem.h&gt;
24
25u16 MEMSetAllocModeForExpHeap( MEMHeapHandle heap, u16 mode );
26</PRE></DD></DL>
27
28<H2>Arguments</H2>
29<TABLE class="arguments" border="1">
30  <TR>
31<TH><STRONG><EM><CODE>heap</CODE></EM></STRONG></TH>
32<TD>Expanded heap handle</TD>
33  </TR>
34  <TR>
35<TH>mode</TH>
36<TD>Memory allocation mode (see description below)</TD>
37  </TR>
38</TABLE>
39
40<H2>Return Values</H2>
41<P>Returns the memory allocation mode of the current expanded heap before configuration.</P>
42
43<H2>Description</H2>
44<P>This function sets the memory allocation mode of the expanded heap.</P>
45<P>The memory allocation mode is specified with <SPAN class="argument">mode</SPAN>.</P>
46<TABLE class="arguments" border="1">
47  <TR>
48<TH><CODE>MEM_EXPHEAP_ALLOC_MODE_FIRST</CODE></TH>
49<TD>Allocates a memory block from the first free region that is at least the size of the memory block to allocate.</TD>
50  </TR>
51  <TR>
52<TH><CODE>MEM_EXPHEAP_ALLOC_MODE_NEAR</CODE></TH>
53<TD>Searches for a free region nearest in size to the memory block to allocate, then allocates the memory block from this free region.</TD>
54  </TR>
55</TABLE>
56<P>Immediately after the heap is created, the <CODE>MEM_EXPHEAP_ALLOC_MODE_FIRST</CODE> state is entered.</P>
57
58<H2>See Also</H2>
59<P class="reference">
60<A href="MEMGetAllocModeForExpHeap.html">MEMGetAllocModeForExpHeap</A>
61</P>
62
63<H2>Revision History</H2>
64<P>
652006/03/01 Initial version.<BR>
66</P>
67
68<hr><p>CONFIDENTIAL</p></body>
69</HTML>
70