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>MEMAllocFromExpHeapEx</TITLE> 13 14</HEAD> 15 16 17<BODY> 18 19 20<!-- �^�C�g���� --> 21<H1>MEMAllocFromExpHeapEx</H1> 22 23 24<H2>C Specification</H2> 25<PRE class="construction">#include <revolution/mem.h> 26 27void* MEMAllocFromExpHeapEx( 28MEMHeapHandle heap, 29u32 size, 30int alignment);</PRE> 31 32 33<H2>Arguments</H2> 34<TABLE border="1"> 35 36 <TR> 37 <TD><STRONG><EM><CODE>heap</CODE></EM></STRONG></TD> 38 <TD>Expanded heap handle.</TD> 39</TR> 40 <TR> 41<TD><STRONG><EM><CODE>size</CODE></EM></STRONG></TD> 42<TD>Size of memory block in bytes.</TD> 43 </TR> 44 <TR> 45<TD><STRONG><EM><CODE>alignment</CODE></EM></STRONG></TD> 46<TD>Memory block alignment. <BR>The following values can be specified: 4, 8, 16, 32, 64, 128, -4, -8, -16, -32, -64, -128.</TD> 47 </TR> 48 </TABLE> 49 50 51<H2>Return Values</H2> 52<P>When the memory block is allocated, the start address of this memory block is returned. When the memory cannot be allocated, <CODE>NULL</CODE> is returned. </P> 53<H2>Description</H2> 54<P>Allocates a memory block from the expanded heap. Memory block alignment is specified by <STRONG><EM><CODE>alignment</CODE></EM></STRONG>. If the alignment is a negative value, the memory block is allocated from the top of the free region in the heap.</P> 55<P>If the memory block is allocatable, the actual size of the memory block may be greater than the specified size. To determine the actual allocated size in bytes, use the <A href="MEMGetSizeForMBlockExpHeap.html"><CODE>MEMGetSizeForMBlockExpHeap</CODE></A> function.</P> 56<H2>See Also</H2> 57<P class="reference"><A href="MEMAllocFromExpHeap.html">MEMAllocFromExpHeap</A>, <A href="MEMFreeToExpHeap.html">MEMFreeToExpHeap</A>, <A href="MEMCreateExpHeap.html">MEMCreateExpHeap</A>, <A href="MEMCreateExpHeapEx.html">MEMCreateExpHeapEx</A></P> 58 59 60<H2>Revision History</H2> 61<P>03/01/2006 Initial version.</P> 62 63 64</BODY> 65</HTML> 66