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_InitAllocator</title>
8<link rel="stylesheet" href="../../css/nitro.css" type="text/css" />
9</head>
10<body>
11<h1>MI_InitAllocator <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_InitAllocator(<a href="MIAllocator.html">MIAllocator</a> *allocator,</code></dd>
18  <dd><code>             void *userdata,</code></dd>
19  <dd><code> <a href="MIAllocatorAllocFunction.html">            MIAllocatorAllocFunction</a> alloc,</code></dd>
20  <dd><code> <a href="MIAllocatorFreeFunction.html">            MIAllocatorFreeFunction</a> free);</code></dd>
21</dl>
22
23<h2>Arguments</h2>
24<table border="1" width="100%">
25  <tbody>
26    <tr>
27      <td style="width:13%"><em><strong>allocator</strong></em></td>
28      <td style="width:87%">Pointer to the <CODE><a href="MIAllocator.html">MIAllocator</a></CODE> structure to be initialized.</td>
29    </tr>
30    <tr>
31      <td style="width:13%"><em><strong>userdata</strong></em></td>
32      <td style="width:87%">Any user-defined value to be linked with the structure.</td>
33    </tr>
34    <tr>
35      <td style="width:13%"><em><strong>alloc</strong></em></td>
36      <td style="width:87%">Pointer to the callback function to be used for memory allocation.</td>
37    </tr>
38    <tr>
39      <td style="width:13%"><em><strong>free</strong></em></td>
40      <td style="width:87%">Pointer to the callback function to be used for memory deallocation.</td>
41    </tr>
42  </tbody>
43</table>
44
45<h2>Return Values</h2>
46<p>None.</p>
47
48<h2>Description</h2>
49<p>Specifies the callback to use for memory management and a freely configurable argument, and initializes the <a href="MIAllocator.html"><CODE>MIAllocator</CODE></a> structure.</p>
50<p>Calling <a href="MI_CallAlloc.html"><CODE>MI_CallAlloc()</CODE></a> or <a href="MI_CallFree.html"><CODE>MI_CallFree()</CODE></a> with this structure will cause the callback functions to be called directly.<br />For more information, see the reference for the <a href="MIAllocator.html"><CODE>MIAllocator</CODE></a> structure.
51</p>
52
53<h2>See Also</h2>
54<p><code><a href="MIAllocator.html">MIAllocator,</a> <a href="MIAllocatorAllocFunction.html">MIAllocatorAllocFunction</a>, <a href="MIAllocatorFreeFunction.html">MIAllocatorFreeFunction</a> <br /> <a href="MI_CallAlloc.html">MI_CallAlloc</a>, <a href="MI_CallFree.html">MI_CallFree</a></code></p>
55<h2>Revision History</h2>
56<p>2007/06/12 Initial version.</p>
57<hr><p>CONFIDENTIAL</p></body>
58</html>
59