1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2<html>
3<head>
4<META http-equiv="Content-Type" content="text/html; charset=windows-1252">
5<META name="GENERATOR" content="IBM WebSphere Studio Homepage Builder Version 7.0.0.0 for Windows">
6<META http-equiv="Content-Style-Type" content="text/css">
7<title>MI_CallAlloc</title>
8<link rel="stylesheet" href="../../css/nitro.css" type="text/css" />
9</head>
10<body>
11<h1>MI_CallAlloc <IMG src="../../image/NTR.gif" align="middle"><IMG src="../../image/TWL.gif" align="middle"></h1>
12<h2>Syntax</h2>
13<dl>
14  <dd>
15<code>#include &lt;nitro/mi.h&gt;<br />
16  <br />
17  void* MI_CallAlloc(<a href="MIAllocator.html">MIAllocator</a> *allocator, u32 length, u32 alignment);</code></dd>
18</dl>
19
20<h2>Arguments</h2>
21<table border="1" width="100%">
22  <tbody>
23    <tr>
24      <td style="width:13%"><em><strong>allocator</strong></em></td>
25      <td style="width:87%">Pointer to the <a href="MIAllocator.html"><CODE>MIAllocator</CODE></a> structure to access.<br />
26      The allocator must have been initialized using <a href="MI_InitAllocator.html"><CODE>MI_InitAllocator()</CODE></a>.</td>
27    </tr>
28    <tr>
29      <td style="width:13%"><em><strong>length</strong></em></td>
30      <td style="width:87%">Memory size to be allocated.</td>
31    </tr>
32    <tr>
33      <td style="width:13%"><em><strong>alignment</strong></em></td>
34      <td style="width:87%">Boundary alignment required for memory addresses.</td>
35    </tr>
36  </tbody>
37</table>
38
39
40<h2>Return Values</h2>
41<p>Returns the memory actually allocated if successful; otherwise returns NULL.</p>
42
43<h2>Description</h2>
44<p>Allocates memory from the allocator using the <a href="MIAllocator.html"><CODE>MIAllocator</CODE></a> structure.</p>
45<p>Internally, this just calls the callback function for memory allocation specified in <a href="MI_InitAllocator.html"><CODE>MI_InitAllocator()</CODE></a>.<br />For more information, see the reference for the <a href="MIAllocator.html"><CODE>MIAllocator</CODE></a> structure.
46</p>
47
48<h2>See Also</h2>
49<p><code><a href="MIAllocator.html">MIAllocator,</a> <a href="MIAllocatorAllocFunction.html">MIAllocatorAllocFunction</a>, <a href="MIAllocatorFreeFunction.html">MIAllocatorFreeFunction</a> <br /> <a href="MI_InitAllocator.html">MI_InitAllocator</a>, <a href="MI_CallFree.html">MI_CallFree</a></code></p>
50<h2>Revision History</h2>
51<p>2007/06/12 Initial version.</p>
52<hr><p>CONFIDENTIAL</p></body>
53</html>
54