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	<!-- �^�C�g���� -->
12	<TITLE>MEMCreateExpHeapEx</TITLE>
13
14</HEAD>
15
16
17<BODY>
18
19
20<!-- �^�C�g���� -->
21<H1>MEMCreateExpHeapEx</H1>
22
23
24<H2>C Specification</H2>
25<PRE class="construction">#include &lt;revolution/mem.h&gt;
26
27MEMHeapHandle MEMCreateExpHeapEx(
28	void*       startAddress,
29	u32         size,
30	u16         optFlag );</PRE>
31
32
33<H2>Arguments</H2>
34<TABLE border="1">
35
36    <TR>
37	<TD><STRONG><EM><CODE>startAddress</CODE></EM></STRONG></TD>
38	<TD>Start address of the allocated memory region in the heap.</TD>
39</TR>
40    <TR>
41<TD><STRONG><EM><CODE>size</CODE></EM></STRONG></TD>
42<TD>Size (in bytes) of the memory region allocated to the heap.</TD>
43    </TR>
44    <TR>
45<TD><STRONG><EM><CODE>optFlag</CODE></EM></STRONG></TD>
46<TD>Heap options (explained below).</TD>
47    </TR>
48  </TABLE>
49
50
51<H2>Return Values</H2>
52<P>Returns the heap handle when a heap can be created. Returns <CODE>MEM_HEAP_INVALID_HANDLE</CODE> (a <CODE>NULL</CODE> value) if a heap can't be created.</P>
53<H2>Description</H2>
54<P>Creates the expanded heap. The heap region is a memory region that has a size specified by <STRONG><EM><CODE>size</CODE></EM></STRONG> beginning from the address specified by <STRONG><EM><CODE>startAddress</CODE></EM></STRONG>.</P>
55<P>Heap options can be specified with <code>optFlag</code>.</P>
56<TABLE border="1">
57  <TBODY>
58    <TR>
59<TD><CODE>MEM_HEAP_OPT_0_CLEAR</CODE></TD>
60<TD>The allocated memory block is filled with zeroes upon allocation from the heap.</TD>
61    </TR>
62    <TR>
63<TD><CODE>MEM_HEAP_OPT_DEBUG_FILL</CODE></TD>
64<TD>Upon heap creation or whenever memory blocks are allocated or freed, each is filled with different 32-bit values in the memory region. This flag is used for debugging to find memory access bugs caused by either a failure to initialize memory or invalid memory regions. This option is not valid for the <code>FINALROM</code> version of the library.</TD>
65    </TR>
66    <TR>
67<TD><CODE>MEM_HEAP_OPT_THREAD_SAFE</CODE></TD>
68<TD>Enables exclusive processing between threads.</TD>
69    </TR>
70  </TBODY>
71</TABLE>
72<H2>See Also</H2>
73<P class="reference">
74<A href="MEMCreateExpHeap.html"><CODE>MEMCreateExpHeap</CODE></A>
75</P>
76
77
78<H2>Revision History</H2>
79<P>03/01/2006 Initial version.</P>
80
81
82</BODY>
83</HTML>
84