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>MEMCalcHeapSizeForUnitHeap</TITLE> 13 14</HEAD> 15 16 17<BODY> 18 19 20<!-- �^�C�g���� --> 21<H1>MEMCalcHeapSizeForUnitHeap</H1> 22 23 24<H2>C Specification</H2> 25<PRE class="construction">#include <revolution/mem.h> 26 27u32 MEMCalcHeapSizeForUnitHeap( 28 u32 memBlockSize, 29 u32 memBlockNum, 30 int alignment );</PRE> 31 32 33<H2>Arguments</H2> 34<TABLE border="1"> 35 36 <TR> 37 <TD><STRONG><EM><CODE>memBlockSize</CODE></EM></STRONG></TD> 38 <TD>Size of memory block in bytes.</TD> 39</TR> 40 <TR> 41<TD><STRONG><EM><CODE>memBlockNum</CODE></EM></STRONG></TD> 42<TD>Total number of memory blocks to allocate.</TD> 43 </TR> 44 <TR> 45<TD><STRONG><EM><CODE>alignment</CODE></EM></STRONG></TD> 46<TD>Memory block alignment. Specify the following values: 4, 8, 16, 32.</TD> 47 </TR> 48 </TABLE> 49 50 51<H2>Return Values</H2> 52<P>The unit heap size calculated from the memory block size and the number of blocks is returned.</P> 53<H2>Description</H2> 54<P>Gets the size of the required unit heap from the size and number of the memory blocks. When creating a unit heap, the number of memory blocks specified in <STRONG><EM><code>memBlockNum</code></EM></STRONG> can be allocated from the unit heap by specifying the value obtained using this function as the size of the memory region to allocate to the heap.</P> 55<P>This function does not take into consideration the start address of the unit heap that is actually created. As a result, if a value greater than four is specified for the alignment, the size may be a few bytes larger than needed.</P> 56<H2>See Also</H2> 57<P class="reference"><A href="MEMCreateUnitHeap.html">MEMCreateUnitHeap</A>, <A href="MEMCreateUnitHeapEx.html">MEMCreateUnitHeapEx</A></P> 58 59 60<H2>Revision History</H2> 61<P>2006/03/01 Initial version.</P> 62 63 64<hr> 65<P>CONFIDENTIAL</p> 66</BODY> 67</HTML> 68