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>MEMCreateUnitHeap</TITLE> 12 13</HEAD> 14 15 16<BODY> 17 18<H1>MEMCreateUnitHeap</H1> 19 20 21<H2>C Specification</H2> 22<PRE class="construction">#include <revolution/mem.h> 23 24MEMHeapHandle MEMCreateUnitHeap( 25void* startAddress, 26u32 heapSize, 27u32 memBlockSize );</PRE> 28 29 30<H2>Arguments</H2> 31<TABLE border="1"> 32 33 <TR> 34 <TD><STRONG><EM><CODE>startAddress</CODE></EM></STRONG></TD> 35 <TD>Start address of the allocated memory region in the heap.</TD> 36</TR> 37 <TR> 38<TD><STRONG><EM><CODE>heapSize</CODE></EM></STRONG></TD> 39<TD>Size in bytes of the memory region allocated to the heap.</TD> 40 </TR> 41 <TR> 42<TD><STRONG><EM><CODE>memBlockSize</CODE></EM></STRONG></TD> 43<TD>Size of memory block in bytes.</TD> 44 </TR> 45 </TABLE> 46 47 48<H2>Return Values</H2> 49<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> 50<H2>Description</H2> 51<P>Creates the unit heap. The heap region is a memory region with size <STRONG><EM><code>heapSize</code></EM></STRONG> and a start address specified by <CODE><EM><code>startAddress</code></EM></CODE>.</P> 52<P>Each memory block has a fixed size specified by <STRONG><EM><code>memBlockSize</code></EM></STRONG>. The memory block alignment is 4.</P> 53<H2>See Also</H2> 54<P class="reference"> 55<A href="MEMCreateUnitHeapEx.html"><CODE>MEMCreateUnitHeapEx</CODE></A></P> 56 57 58<H2>Revision History</H2> 59<P>03/01/2006 Initial version.</P> 60 61 62</BODY> 63</HTML> 64