blob: b78c58b9f02f9d646f153d0bb73e540a5d02cf99 [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title>OsclErrorAllocator class Reference</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.2.18 -->
<center>
<a class="qindex" href="index.html">Main Page</a> &nbsp; <a class="qindex" href="modules.html">Modules</a> &nbsp; <a class="qindex" href="hierarchy.html">Class Hierarchy</a> &nbsp; <a class="qindex" href="annotated.html">Data Structures</a> &nbsp; <a class="qindex" href="files.html">File List</a> &nbsp; <a class="qindex" href="functions.html">Data Fields</a> &nbsp; <a class="qindex" href="globals.html">Globals</a> &nbsp; </center>
<hr><h1>OsclErrorAllocator Class Reference<br>
<small>
[<a class="el" href="group__osclerror.html">OSCL Error</a>]</small>
</h1>This class provides static methods to invoke the user defined memory allocation routines.
<a href="#_details">More...</a>
<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></td></tr>
<tr><td colspan=2><br><h2>Public Methods</h2></td></tr>
<tr><td nowrap align=right valign=top>&nbsp;</td><td valign=bottom><a class="el" href="classOsclErrorAllocator.html#a0">OsclErrorAllocator</a> (<a class="el" href="classOscl__DefAlloc.html">Oscl_DefAlloc</a> *<a class="el" href="classallocator.html">allocator</a>)</td></tr>
<tr><td>&nbsp;</td><td><font size=-1><em>constructor method</em> <a href="#a0"></a><em></em></font><br><br></td></tr>
<tr><td nowrap align=right valign=top>void *&nbsp;</td><td valign=bottom><a class="el" href="classOsclErrorAllocator.html#a1">operator new</a> (uint32 size, <a class="el" href="group__osclbase.html#a25">OsclAny</a> *aPtr)</td></tr>
<tr><td>&nbsp;</td><td><font size=-1><em>placement new operator that allocates memory using the user defined methods</em> <a href="#a1"></a><em></em></font><br><br></td></tr>
<tr><td nowrap align=right valign=top>void&nbsp;</td><td valign=bottom><a class="el" href="classOsclErrorAllocator.html#a2">operator delete</a> (<a class="el" href="group__osclbase.html#a25">OsclAny</a> *aPtr, <a class="el" href="group__osclbase.html#a25">OsclAny</a> *aPtr2)</td></tr>
<tr><td>&nbsp;</td><td><font size=-1><em>delete operator that doesn't do anything, user has to deallocate manually</em> <a href="#a2"></a><em></em></font><br><br></td></tr>
<tr><td colspan=2><br><h2>Static Public Methods</h2></td></tr>
<tr><td nowrap align=right valign=top><a class="el" href="group__osclbase.html#a25">OsclAny</a> *&nbsp;</td><td valign=bottom><a class="el" href="classOsclErrorAllocator.html#d0">allocate</a> (uint32 aSize)</td></tr>
<tr><td>&nbsp;</td><td><font size=-1><em>static method to allocate a block of memory on heap</em> <a href="#d0"></a><em></em></font><br><br></td></tr>
<tr><td nowrap align=right valign=top><a class="el" href="group__osclbase.html#a25">OsclAny</a>&nbsp;</td><td valign=bottom><a class="el" href="classOsclErrorAllocator.html#d1">deallocate</a> (<a class="el" href="group__osclbase.html#a25">OsclAny</a> *aPointer)</td></tr>
<tr><td>&nbsp;</td><td><font size=-1><em>static method to deallocate a block of memory on heap</em> <a href="#d1"></a><em></em></font><br><br></td></tr>
</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
This class provides static methods to invoke the user defined memory allocation routines.
<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 name="a0" doxytag="OsclErrorAllocator::OsclErrorAllocator"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
<tr>
<td class="md">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> OsclErrorAllocator::OsclErrorAllocator </td>
<td class="md" valign="top">(&nbsp;</td>
<td class="md" nowrap valign="top"><a class="el" href="classOscl__DefAlloc.html">Oscl_DefAlloc</a> *&nbsp;</td>
<td class="mdname1" valign="top" nowrap>&nbsp; <em>allocator</em> </td>
<td class="md" valign="top">)&nbsp;</td>
<td class="md" nowrap><code> [inline]</code></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
&nbsp;
</td>
<td>
<p>
constructor method
<p>
<dl compact><dt><b>Parameters: </b></dt><dd>
<table border=0 cellspacing=2 cellpadding=0>
<tr><td valign=top><em>allocator</em>&nbsp;</td><td>
- a pointer to the concrete object that provides the allocator/deallocator </td></tr>
</table>
</dl> </td>
</tr>
</table>
<hr><h2>Member Function Documentation</h2>
<a name="d0" doxytag="OsclErrorAllocator::allocate"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
<tr>
<td class="md">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> <a class="el" href="group__osclbase.html#a25">OsclAny</a>* OsclErrorAllocator::allocate </td>
<td class="md" valign="top">(&nbsp;</td>
<td class="md" nowrap valign="top">uint32&nbsp;</td>
<td class="mdname1" valign="top" nowrap>&nbsp; <em>aSize</em> </td>
<td class="md" valign="top">)&nbsp;</td>
<td class="md" nowrap><code> [inline, static]</code></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
&nbsp;
</td>
<td>
<p>
static method to allocate a block of memory on heap
<p>
<dl compact><dt><b>Parameters: </b></dt><dd>
<table border=0 cellspacing=2 cellpadding=0>
<tr><td valign=top><em>aSize</em>&nbsp;</td><td>
- number of bytes to allocate </td></tr>
</table>
</dl> </td>
</tr>
</table>
<a name="d1" doxytag="OsclErrorAllocator::deallocate"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
<tr>
<td class="md">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> <a class="el" href="group__osclbase.html#a25">OsclAny</a> OsclErrorAllocator::deallocate </td>
<td class="md" valign="top">(&nbsp;</td>
<td class="md" nowrap valign="top"><a class="el" href="group__osclbase.html#a25">OsclAny</a> *&nbsp;</td>
<td class="mdname1" valign="top" nowrap>&nbsp; <em>aPointer</em> </td>
<td class="md" valign="top">)&nbsp;</td>
<td class="md" nowrap><code> [inline, static]</code></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
&nbsp;
</td>
<td>
<p>
static method to deallocate a block of memory on heap
<p>
<dl compact><dt><b>Parameters: </b></dt><dd>
<table border=0 cellspacing=2 cellpadding=0>
<tr><td valign=top><em>aPointer</em>&nbsp;</td><td>
- pointer to block of memory to be deallocated </td></tr>
</table>
</dl> </td>
</tr>
</table>
<a name="a2" doxytag="OsclErrorAllocator::operator delete"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
<tr>
<td class="md">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> void OsclErrorAllocator::operator delete </td>
<td class="md" valign="top">(&nbsp;</td>
<td class="md" nowrap valign="top"><a class="el" href="group__osclbase.html#a25">OsclAny</a> *&nbsp;</td>
<td class="mdname" nowrap>&nbsp; <em>aPtr</em>, </td>
</tr>
<tr>
<td></td>
<td></td>
<td class="md" nowrap><a class="el" href="group__osclbase.html#a25">OsclAny</a> *&nbsp;</td>
<td class="mdname" nowrap>&nbsp; <em>aPtr2</em></td>
</tr>
<tr>
<td></td>
<td class="md">)&nbsp;</td>
<td class="md" colspan="2"><code> [inline]</code></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
&nbsp;
</td>
<td>
<p>
delete operator that doesn't do anything, user has to deallocate manually
<p>
</td>
</tr>
</table>
<a name="a1" doxytag="OsclErrorAllocator::operator new"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
<tr>
<td class="md">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> void* OsclErrorAllocator::operator new </td>
<td class="md" valign="top">(&nbsp;</td>
<td class="md" nowrap valign="top">uint32&nbsp;</td>
<td class="mdname" nowrap>&nbsp; <em>size</em>, </td>
</tr>
<tr>
<td></td>
<td></td>
<td class="md" nowrap><a class="el" href="group__osclbase.html#a25">OsclAny</a> *&nbsp;</td>
<td class="mdname" nowrap>&nbsp; <em>aPtr</em></td>
</tr>
<tr>
<td></td>
<td class="md">)&nbsp;</td>
<td class="md" colspan="2"><code> [inline]</code></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
&nbsp;
</td>
<td>
<p>
placement new operator that allocates memory using the user defined methods
<p>
</td>
</tr>
</table>
<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></ul>
<hr size="1"><img src="pvlogo_small.jpg"><address style="align: right;"><small>OSCL API</small>
<address style="align: left;"><small>Posting Version: OPENCORE_20090310 </small>
</small></address>
</body>
</html>