aboutsummaryrefslogtreecommitdiff
path: root/doc/oscl_html/classOsclErrorAllocator.html
blob: d216c971fa88a2ae163e7efda5279e87588a9dce (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>oscl: OsclErrorAllocator Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<!-- Generated by Doxygen 1.6.3 -->
<div class="navigation" id="top">
  <div class="tabs">
    <ul>
      <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
      <li><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li class="current"><a href="annotated.html"><span>Data&nbsp;Structures</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
    </ul>
  </div>
  <div class="tabs">
    <ul>
      <li><a href="annotated.html"><span>Data&nbsp;Structures</span></a></li>
      <li><a href="hierarchy.html"><span>Class&nbsp;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Data&nbsp;Fields</span></a></li>
    </ul>
  </div>
</div>
<div class="contents">
<h1>OsclErrorAllocator Class Reference<br/>
<small>
[<a class="el" href="group__osclerror.html">OSCL Error</a>]</small>
</h1><!-- doxytag: class="OsclErrorAllocator" -->
<p>This class provides static methods to invoke the user defined memory allocation routines.  
<a href="#_details">More...</a></p>

<p><code>#include &lt;<a class="el" href="oscl__error__allocator_8h_source.html">oscl_error_allocator.h</a>&gt;</code></p>
<table border="0" cellpadding="0" cellspacing="0">
<tr><td colspan="2"><h2>Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classOsclErrorAllocator.html#ab5b7172c184a5190b1619c5b034cdbcf">OsclErrorAllocator</a> (<a class="el" href="classOscl__DefAlloc.html">Oscl_DefAlloc</a> *<a class="el" href="classallocator.html">allocator</a>)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">constructor method  <a href="#ab5b7172c184a5190b1619c5b034cdbcf"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classOsclErrorAllocator.html#a4370e896db710ffee80dd3f79719d38f">operator new</a> (uint32 size, <a class="el" href="group__osclbase.html#ga3bac54662348f5e6c08b97ca97066b89">OsclAny</a> *aPtr)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">placement new operator that allocates memory using the user defined methods  <a href="#a4370e896db710ffee80dd3f79719d38f"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classOsclErrorAllocator.html#a304fea86c31b02870a509756e0e5aae1">operator delete</a> (<a class="el" href="group__osclbase.html#ga3bac54662348f5e6c08b97ca97066b89">OsclAny</a> *aPtr, <a class="el" href="group__osclbase.html#ga3bac54662348f5e6c08b97ca97066b89">OsclAny</a> *aPtr2)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">delete operator that doesn't do anything, user has to deallocate manually  <a href="#a304fea86c31b02870a509756e0e5aae1"></a><br/></td></tr>
<tr><td colspan="2"><h2>Static Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static <a class="el" href="group__osclbase.html#ga3bac54662348f5e6c08b97ca97066b89">OsclAny</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classOsclErrorAllocator.html#a872504e0c6cc0c124e3735fd63a2a41e">allocate</a> (uint32 aSize)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">static method to allocate a block of memory on heap  <a href="#a872504e0c6cc0c124e3735fd63a2a41e"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static <a class="el" href="group__osclbase.html#ga3bac54662348f5e6c08b97ca97066b89">OsclAny</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classOsclErrorAllocator.html#a69b74e3d21761004022b7ae93ca1e89b">deallocate</a> (<a class="el" href="group__osclbase.html#ga3bac54662348f5e6c08b97ca97066b89">OsclAny</a> *aPointer)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">static method to deallocate a block of memory on heap  <a href="#a69b74e3d21761004022b7ae93ca1e89b"></a><br/></td></tr>
</table>
<hr/><a name="_details"></a><h2>Detailed Description</h2>
<p>This class provides static methods to invoke the user defined memory allocation routines. </p>
<p>This class must be instantiated before the static methods are called, else asserts will happen </p>
<hr/><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="ab5b7172c184a5190b1619c5b034cdbcf"></a><!-- doxytag: member="OsclErrorAllocator::OsclErrorAllocator" ref="ab5b7172c184a5190b1619c5b034cdbcf" args="(Oscl_DefAlloc *allocator)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">OsclErrorAllocator::OsclErrorAllocator </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classOscl__DefAlloc.html">Oscl_DefAlloc</a> *&nbsp;</td>
          <td class="paramname"> <em>allocator</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>constructor method </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>allocator</em>&nbsp;</td><td>- a pointer to the concrete object that provides the allocator/deallocator </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="a872504e0c6cc0c124e3735fd63a2a41e"></a><!-- doxytag: member="OsclErrorAllocator::allocate" ref="a872504e0c6cc0c124e3735fd63a2a41e" args="(uint32 aSize)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static <a class="el" href="group__osclbase.html#ga3bac54662348f5e6c08b97ca97066b89">OsclAny</a>* OsclErrorAllocator::allocate </td>
          <td>(</td>
          <td class="paramtype">uint32&nbsp;</td>
          <td class="paramname"> <em>aSize</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td><code> [inline, static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>static method to allocate a block of memory on heap </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>aSize</em>&nbsp;</td><td>- number of bytes to allocate </td></tr>
  </table>
  </dd>
</dl>

<p>References <a class="el" href="oscl__base__macros_8h_source.html#l00042">NULL</a>, and <a class="el" href="oscl__assert_8h_source.html#l00041">OSCL_ASSERT</a>.</p>

</div>
</div>
<a class="anchor" id="a69b74e3d21761004022b7ae93ca1e89b"></a><!-- doxytag: member="OsclErrorAllocator::deallocate" ref="a69b74e3d21761004022b7ae93ca1e89b" args="(OsclAny *aPointer)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static <a class="el" href="group__osclbase.html#ga3bac54662348f5e6c08b97ca97066b89">OsclAny</a> OsclErrorAllocator::deallocate </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__osclbase.html#ga3bac54662348f5e6c08b97ca97066b89">OsclAny</a> *&nbsp;</td>
          <td class="paramname"> <em>aPointer</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td><code> [inline, static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>static method to deallocate a block of memory on heap </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>aPointer</em>&nbsp;</td><td>- pointer to block of memory to be deallocated </td></tr>
  </table>
  </dd>
</dl>

<p>References <a class="el" href="classOscl__DefAlloc.html#a517d6b431b966f79a745e73d1a0a438f">Oscl_DefAlloc::deallocate()</a>, <a class="el" href="oscl__base__macros_8h_source.html#l00042">NULL</a>, and <a class="el" href="oscl__assert_8h_source.html#l00041">OSCL_ASSERT</a>.</p>

</div>
</div>
<a class="anchor" id="a304fea86c31b02870a509756e0e5aae1"></a><!-- doxytag: member="OsclErrorAllocator::operator delete" ref="a304fea86c31b02870a509756e0e5aae1" args="(OsclAny *aPtr, OsclAny *aPtr2)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void OsclErrorAllocator::operator delete </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__osclbase.html#ga3bac54662348f5e6c08b97ca97066b89">OsclAny</a> *&nbsp;</td>
          <td class="paramname"> <em>aPtr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__osclbase.html#ga3bac54662348f5e6c08b97ca97066b89">OsclAny</a> *&nbsp;</td>
          <td class="paramname"> <em>aPtr2</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>delete operator that doesn't do anything, user has to deallocate manually </p>

<p>References <a class="el" href="oscl__base__macros_8h_source.html#l00085">OSCL_UNUSED_ARG</a>.</p>

</div>
</div>
<a class="anchor" id="a4370e896db710ffee80dd3f79719d38f"></a><!-- doxytag: member="OsclErrorAllocator::operator new" ref="a4370e896db710ffee80dd3f79719d38f" args="(uint32 size, OsclAny *aPtr)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void* OsclErrorAllocator::operator new </td>
          <td>(</td>
          <td class="paramtype">uint32&nbsp;</td>
          <td class="paramname"> <em>size</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__osclbase.html#ga3bac54662348f5e6c08b97ca97066b89">OsclAny</a> *&nbsp;</td>
          <td class="paramname"> <em>aPtr</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>placement new operator that allocates memory using the user defined methods </p>

<p>References <a class="el" href="oscl__base__macros_8h_source.html#l00085">OSCL_UNUSED_ARG</a>.</p>

</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li><a class="el" href="oscl__error__allocator_8h_source.html">oscl_error_allocator.h</a></li>
</ul>
</div>
<hr size="1"><img src="pvlogo_small.jpg"><address style="align: right;"><small>OSCL API</small>
<address style="align: left;"><small>Posting Version: CORE_9.002.1.1 </small>
</small></address>
</body>
</html>