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>MEMCreateFrmHeapEx</TITLE>
12
13</HEAD>
14
15
16<BODY>
17
18
19<H1>MEMCreateFrmHeapEx</H1>
20
21
22<H2>C Specification</H2>
23<PRE class="construction">#include &lt;revolution/mem.h&gt;
24
25MEMHeapHandle MEMCreateFrmHeapEx(
26	void*   	startAddress ,
27	u32         size,
28	u16         optFlag );</PRE>
29
30
31<H2>Arguments</H2>
32<TABLE border="1">
33
34    <TR>
35	<TD><STRONG><EM><CODE>startAddress</CODE></EM></STRONG></TD>
36	<TD>Start address of the allocated memory region in the heap.</TD>
37</TR>
38    <TR>
39<TD><STRONG><EM><CODE>size</CODE></EM></STRONG></TD>
40<TD>Size in bytes of the memory region allocated to the heap.</TD>
41    </TR>
42    <TR>
43<TD><STRONG><EM><CODE>optFlag</CODE></EM></STRONG></TD>
44<TD>Heap options (explained below).</TD>
45    </TR>
46  </TABLE>
47
48
49<H2>Return Values</H2>
50<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>
51<H2>Description</H2>
52<P>Creates the frame 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>
53<P>Heap options can be specified with <code>optFlag</code>.</P>
54<TABLE border="1">
55  <TBODY>
56    <TR>
57<TD><CODE>MEM_HEAP_OPT_0_CLEAR</CODE></TD>
58<TD>The allocated memory block is filled with zeroes upon allocation from the heap.</TD>
59    </TR>
60    <TR>
61<TD><CODE>MEM_HEAP_OPT_DEBUG_FILL</CODE></TD>
62<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>
63    </TR>
64    <TR>
65<TD><CODE>MEM_HEAP_OPT_THREAD_SAFE</CODE></TD>
66<TD>Enables exclusive processing between threads.</TD>
67    </TR>
68  </TBODY>
69</TABLE>
70<H2>See Also</H2>
71<P class="reference">
72<A href="MEMCreateFrmHeap.html"><CODE>MEMCreateFrmHeap</CODE></A>
73</P>
74
75
76<H2>Revision History</H2>
77<P>03/01/2006 Initial version.</P>
78
79
80</BODY>
81</HTML>
82