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>MEMResizeForMBlockExpHeap</TITLE>
12
13</HEAD>
14
15
16<BODY>
17
18<H1>MEMResizeForMBlockExpHeap</H1>
19
20
21<H2>C Specification</H2>
22<PRE class="construction">#include &lt;revolution/mem.h&gt;
23
24u32 MEMResizeForMBlockExpHeap(
25	MEMHeapHandle    heap,
26	void*            memBlock,
27	u32              size );</PRE>
28
29
30<H2>Arguments</H2>
31<TABLE border="1">
32
33    <TR>
34	<TD><STRONG><EM><CODE>heap</CODE></EM></STRONG></TD>
35	<TD>Expanded heap handle.</TD>
36</TR>
37    <TR>
38<TD><STRONG><EM><CODE>memBlock</CODE></EM></STRONG></TD>
39<TD>Pointer to the memory block to change the size of.</TD>
40    </TR>
41    <TR>
42<TD><STRONG><EM><CODE>size</CODE></EM></STRONG></TD>
43<TD>Size in bytes to change the memory block to.</TD>
44    </TR>
45  </TABLE>
46
47
48<H2>Return Values</H2>
49<P>If the function succeeds, returns the size in bytes of the changed memory block. Otherwise, zero is returned.</P>
50<H2>Description</H2>
51<P>Changes the size of the memory block allocated from the expanded heap.</P>
52<P>When increasing the current size of the memory block, there must be enough free space after the memory block to increase the size. If the free space is insufficient, the function fails and returns zero. If the size increase of the memory block is successful, the size increase may be greater than the specified size.</P>
53<P>When reducinng the memory block size, reducing the size may be impossible because a free region is not created when reducing the memory block size by only a few bytes. In this case, the current size of the memory block is returned.</P>
54<H2>See Also</H2>
55<P class="reference"><A href="MEMAllocFromExpHeap.html">MEMAllocFromExpHeap</A>, <A href="MEMAllocFromExpHeapEx.html">MEMAllocFromExpHeapEx</A>, <A href="MEMCreateExpHeap.html">MEMCreateExpHeap</A>, <A href="MEMCreateExpHeapEx.html">MEMCreateExpHeapEx</A></P>
56
57
58<H2>Revision History</H2>
59<P>03/01/2006 Initial version.</P>
60
61
62</BODY>
63</HTML>
64