1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> 2<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"> 3<title>OsclMemAllocator class Reference</title> 4<link href="doxygen.css" rel="stylesheet" type="text/css"> 5</head><body> 6<!-- Generated by Doxygen 1.2.18 --> 7<center> 8<a class="qindex" href="index.html">Main Page</a> <a class="qindex" href="modules.html">Modules</a> <a class="qindex" href="hierarchy.html">Class Hierarchy</a> <a class="qindex" href="annotated.html">Data Structures</a> <a class="qindex" href="files.html">File List</a> <a class="qindex" href="functions.html">Data Fields</a> <a class="qindex" href="globals.html">Globals</a> </center> 9<hr><h1>OsclMemAllocator Class Reference<br> 10<small> 11[<a class="el" href="group__osclmemory.html">OSCL Memory</a>, <a class="el" href="group__osclmemory.html">OSCL Memory</a>]</small> 12</h1><code>#include <<a class="el" href="oscl__mem_8h-source.html">oscl_mem.h</a>></code> 13<p> 14<p>Inheritance diagram for OsclMemAllocator: 15<p><center><img src="classOsclMemAllocator.png" usemap="#OsclMemAllocator_map" border="0" alt=""></center> 16<map name="OsclMemAllocator_map"> 17<area href="classOscl__DefAlloc.html" alt="Oscl_DefAlloc" shape="rect" coords="63,56,179,80"> 18<area href="classOscl__Alloc.html" alt="Oscl_Alloc" shape="rect" coords="0,0,116,24"> 19<area href="classOscl__Dealloc.html" alt="Oscl_Dealloc" shape="rect" coords="126,0,242,24"> 20</map> 21<table border=0 cellpadding=0 cellspacing=0> 22<tr><td></td></tr> 23<tr><td colspan=2><br><h2>Public Methods</h2></td></tr> 24<tr><td nowrap align=right valign=top><a class="el" href="group__osclbase.html#a25">OsclAny</a> * </td><td valign=bottom><a class="el" href="classOsclMemAllocator.html#a0">allocate</a> (const uint32 n)</td></tr> 25<tr><td nowrap align=right valign=top><a class="el" href="group__osclbase.html#a25">OsclAny</a> * </td><td valign=bottom><a class="el" href="classOsclMemAllocator.html#a1">allocate_fl</a> (const uint32 n, const char *file_name, const int line_num)</td></tr> 26<tr><td nowrap align=right valign=top>void </td><td valign=bottom><a class="el" href="classOsclMemAllocator.html#a2">deallocate</a> (<a class="el" href="group__osclbase.html#a25">OsclAny</a> *p)</td></tr> 27</table> 28<hr><a name="_details"></a><h2>Detailed Description</h2> 29A simple allocator class. Configurable as to whether this goes through the memory manager or not. 30<p> 31<hr><h2>Member Function Documentation</h2> 32<a name="a0" doxytag="OsclMemAllocator::allocate"></a><p> 33<table width="100%" cellpadding="2" cellspacing="0" border="0"> 34 <tr> 35 <td class="md"> 36 <table cellpadding="0" cellspacing="0" border="0"> 37 <tr> 38 <td class="md" nowrap valign="top"> <a class="el" href="group__osclbase.html#a25">OsclAny</a>* OsclMemAllocator::allocate </td> 39 <td class="md" valign="top">( </td> 40 <td class="md" nowrap valign="top">const uint32 </td> 41 <td class="mdname1" valign="top" nowrap> <em>n</em> </td> 42 <td class="md" valign="top">) </td> 43 <td class="md" nowrap><code> [inline, virtual]</code></td> 44 </tr> 45 46 </table> 47 </td> 48 </tr> 49</table> 50<table cellspacing=5 cellpadding=0 border=0> 51 <tr> 52 <td> 53 54 </td> 55 <td> 56 57<p> 58This API throws an exception when malloc returns NULL. n must be greater than 0. 59<p> 60<dl compact><dt><b>Returns: </b></dt><dd> 61pointer (or Leave with OsclErrNoMemory ) </dl> 62<p> 63Implements <a class="el" href="classOscl__DefAlloc.html#a0">Oscl_DefAlloc</a>. </td> 64 </tr> 65</table> 66<a name="a1" doxytag="OsclMemAllocator::allocate_fl"></a><p> 67<table width="100%" cellpadding="2" cellspacing="0" border="0"> 68 <tr> 69 <td class="md"> 70 <table cellpadding="0" cellspacing="0" border="0"> 71 <tr> 72 <td class="md" nowrap valign="top"> <a class="el" href="group__osclbase.html#a25">OsclAny</a>* OsclMemAllocator::allocate_fl </td> 73 <td class="md" valign="top">( </td> 74 <td class="md" nowrap valign="top">const uint32 </td> 75 <td class="mdname" nowrap> <em>n</em>, </td> 76 </tr> 77 <tr> 78 <td></td> 79 <td></td> 80 <td class="md" nowrap>const char * </td> 81 <td class="mdname" nowrap> <em>file_name</em>, </td> 82 </tr> 83 <tr> 84 <td></td> 85 <td></td> 86 <td class="md" nowrap>const int </td> 87 <td class="mdname" nowrap> <em>line_num</em></td> 88 </tr> 89 <tr> 90 <td></td> 91 <td class="md">) </td> 92 <td class="md" colspan="2"><code> [inline, virtual]</code></td> 93 </tr> 94 95 </table> 96 </td> 97 </tr> 98</table> 99<table cellspacing=5 cellpadding=0 border=0> 100 <tr> 101 <td> 102 103 </td> 104 <td> 105 106<p> 107 108<p> 109Reimplemented from <a class="el" href="classOscl__DefAlloc.html#a1">Oscl_DefAlloc</a>. </td> 110 </tr> 111</table> 112<a name="a2" doxytag="OsclMemAllocator::deallocate"></a><p> 113<table width="100%" cellpadding="2" cellspacing="0" border="0"> 114 <tr> 115 <td class="md"> 116 <table cellpadding="0" cellspacing="0" border="0"> 117 <tr> 118 <td class="md" nowrap valign="top"> void OsclMemAllocator::deallocate </td> 119 <td class="md" valign="top">( </td> 120 <td class="md" nowrap valign="top"><a class="el" href="group__osclbase.html#a25">OsclAny</a> * </td> 121 <td class="mdname1" valign="top" nowrap> <em>p</em> </td> 122 <td class="md" valign="top">) </td> 123 <td class="md" nowrap><code> [inline, virtual]</code></td> 124 </tr> 125 126 </table> 127 </td> 128 </tr> 129</table> 130<table cellspacing=5 cellpadding=0 border=0> 131 <tr> 132 <td> 133 134 </td> 135 <td> 136 137<p> 138 139<p> 140Implements <a class="el" href="classOscl__DefAlloc.html#a2">Oscl_DefAlloc</a>. </td> 141 </tr> 142</table> 143<hr>The documentation for this class was generated from the following file:<ul> 144<li><a class="el" href="oscl__mem_8h-source.html">oscl_mem.h</a></ul> 145<hr size="1"><img src="pvlogo_small.jpg"><address style="align: right;"><small>OSCL API</small> 146<address style="align: left;"><small>Posting Version: OPENCORE_20090310 </small> 147</small></address> 148</body> 149</html> 150