Home | History | Annotate | Download | only in oscl_html
      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>oscl_mem.h File 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> &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>
      9 <hr><h1>oscl_mem.h File Reference</h1>This file contains basic memory definitions for common use across platforms. 
     10 <a href="#_details">More...</a>
     11 <p>
     12 <code>#include "<a class="el" href="osclconfig__memory_8h-source.html">osclconfig_memory.h</a>"</code><br>
     13 <code>#include "<a class="el" href="oscl__base_8h-source.html">oscl_base.h</a>"</code><br>
     14 <code>#include "<a class="el" href="oscl__types_8h-source.html">oscl_types.h</a>"</code><br>
     15 <code>#include "<a class="el" href="oscl__assert_8h-source.html">oscl_assert.h</a>"</code><br>
     16 <code>#include "<a class="el" href="oscl__mem__basic__functions_8h-source.html">oscl_mem_basic_functions.h</a>"</code><br>
     17 <code>#include "<a class="el" href="oscl__lock__base_8h-source.html">oscl_lock_base.h</a>"</code><br>
     18 <code>#include "<a class="el" href="osclconfig__compiler__warnings_8h-source.html">osclconfig_compiler_warnings.h</a>"</code><br>
     19 <code>#include "<a class="el" href="oscl__mem__inst_8h-source.html">oscl_mem_inst.h</a>"</code><br>
     20 <code>#include "<a class="el" href="oscl__heapbase_8h-source.html">oscl_heapbase.h</a>"</code><br>
     21 <code>#include "<a class="el" href="oscl__defalloc_8h-source.html">oscl_defalloc.h</a>"</code><br>
     22 <code>#include "<a class="el" href="oscl__refcounter_8h-source.html">oscl_refcounter.h</a>"</code><br>
     23 <code>#include "<a class="el" href="oscl__error_8h-source.html">oscl_error.h</a>"</code><br>
     24 <code>#include "<a class="el" href="oscl__exception_8h-source.html">oscl_exception.h</a>"</code><br>
     25 <code>#include "oscl_mem.inl"</code><br>
     26 
     27 <p>
     28 <a href="oscl__mem_8h-source.html">Go to the source code of this file.</a><table border=0 cellpadding=0 cellspacing=0>
     29 <tr><td></td></tr>
     30 <tr><td colspan=2><br><h2>Data Structures</h2></td></tr>
     31 <tr><td nowrap align=right valign=top>class &nbsp;</td><td valign=bottom><a class="el" href="classHeapBase.html">HeapBase</a></td></tr>
     32 <tr><td nowrap align=right valign=top>class &nbsp;</td><td valign=bottom><a class="el" href="classOsclAuditCB.html">OsclAuditCB</a></td></tr>
     33 <tr><td nowrap align=right valign=top>class &nbsp;</td><td valign=bottom><a class="el" href="classOsclMem.html">OsclMem</a></td></tr>
     34 <tr><td nowrap align=right valign=top>class &nbsp;</td><td valign=bottom><a class="el" href="classOsclMemAllocator.html">OsclMemAllocator</a></td></tr>
     35 <tr><td nowrap align=right valign=top>class &nbsp;</td><td valign=bottom><a class="el" href="classOsclMemAllocDestructDealloc.html">OsclMemAllocDestructDealloc</a></td></tr>
     36 <tr><td nowrap align=right valign=top>class &nbsp;</td><td valign=bottom><a class="el" href="classOsclMemBasicAllocator.html">OsclMemBasicAllocator</a></td></tr>
     37 <tr><td nowrap align=right valign=top>class &nbsp;</td><td valign=bottom><a class="el" href="classOsclMemBasicAllocDestructDealloc.html">OsclMemBasicAllocDestructDealloc</a></td></tr>
     38 <tr><td nowrap align=right valign=top>class &nbsp;</td><td valign=bottom><a class="el" href="classOsclMemGlobalAuditObject.html">OsclMemGlobalAuditObject</a></td></tr>
     39 <tr><td colspan=2><br><h2>Defines</h2></td></tr>
     40 <tr><td nowrap align=right valign=top>#define&nbsp;</td><td valign=bottom><a class="el" href="group__osclmemory.html#a33">OSCL_DISABLE_WARNING_TRUNCATE_DEBUG_MESSAGE</a></td></tr>
     41 <tr><td nowrap align=right valign=top>#define&nbsp;</td><td valign=bottom><a class="el" href="group__osclmemory.html#a34">OSCL_HAS_GLOBAL_NEW_DELETE</a>&nbsp;&nbsp;&nbsp;1</td></tr>
     42 <tr><td nowrap align=right valign=top>#define&nbsp;</td><td valign=bottom><a class="el" href="group__osclmemory.html#a35">OSCL_CLEANUP_BASE_CLASS</a>(T)&nbsp;&nbsp;&nbsp;_OSCL_CLEANUP_BASE_CLASS(T)</td></tr>
     43 <tr><td nowrap align=right valign=top>#define&nbsp;</td><td valign=bottom><a class="el" href="group__osclmemory.html#a36">OSCL_ALLOC_NEW</a>(T_allocator, T, params)&nbsp;&nbsp;&nbsp;new(T_allocator.allocate(1)) T params</td></tr>
     44 <tr><td nowrap align=right valign=top>#define&nbsp;</td><td valign=bottom><a class="el" href="group__osclmemory.html#a37">OSCL_TRAP_ALLOC_NEW</a>(T_ptr, T_allocator, T, params)&nbsp;&nbsp;&nbsp;_OSCL_TRAP_NEW(T_allocator.allocate(1),T_allocator.deallocate,T_ptr,T,params)</td></tr>
     45 <tr><td nowrap align=right valign=top>#define&nbsp;</td><td valign=bottom><a class="el" href="group__osclmemory.html#a38">OSCL_ALLOC_DELETE</a>(ptr, T_allocator, T)</td></tr>
     46 <tr><td nowrap align=right valign=top>#define&nbsp;</td><td valign=bottom><a class="el" href="group__osclmemory.html#a39">OSCL_MALLOC</a>(count)&nbsp;&nbsp;&nbsp;_oscl_default_audit_malloc(count)</td></tr>
     47 <tr><td nowrap align=right valign=top>#define&nbsp;</td><td valign=bottom><a class="el" href="group__osclmemory.html#a40">oscl_malloc</a>(a)&nbsp;&nbsp;&nbsp;OSCL_MALLOC(a)</td></tr>
     48 <tr><td nowrap align=right valign=top>#define&nbsp;</td><td valign=bottom><a class="el" href="group__osclmemory.html#a41">OSCL_DEFAULT_MALLOC</a>(x)&nbsp;&nbsp;&nbsp;OSCL_MALLOC(x)</td></tr>
     49 <tr><td nowrap align=right valign=top>#define&nbsp;</td><td valign=bottom><a class="el" href="group__osclmemory.html#a42">OSCL_AUDIT_MALLOC</a>(auditCB, count)&nbsp;&nbsp;&nbsp;_oscl_audit_malloc(count, auditCB)</td></tr>
     50 <tr><td nowrap align=right valign=top>#define&nbsp;</td><td valign=bottom><a class="el" href="group__osclmemory.html#a43">OSCL_CALLOC</a>(num, size)&nbsp;&nbsp;&nbsp;_oscl_default_audit_calloc(num,size)</td></tr>
     51 <tr><td nowrap align=right valign=top>#define&nbsp;</td><td valign=bottom><a class="el" href="group__osclmemory.html#a44">oscl_calloc</a>(a, b)&nbsp;&nbsp;&nbsp;OSCL_CALLOC(a,b)</td></tr>
     52 <tr><td nowrap align=right valign=top>#define&nbsp;</td><td valign=bottom><a class="el" href="group__osclmemory.html#a45">OSCL_AUDIT_CALLOC</a>(auditCB, num, size)&nbsp;&nbsp;&nbsp;_oscl_audit_calloc(num,size, auditCB)</td></tr>
     53 <tr><td nowrap align=right valign=top>#define&nbsp;</td><td valign=bottom><a class="el" href="group__osclmemory.html#a46">OSCL_REALLOC</a>(ptr, new_size)&nbsp;&nbsp;&nbsp;_oscl_default_audit_realloc(ptr,new_size)</td></tr>
     54 <tr><td nowrap align=right valign=top>#define&nbsp;</td><td valign=bottom><a class="el" href="group__osclmemory.html#a47">oscl_realloc</a>(a, b)&nbsp;&nbsp;&nbsp;OSCL_REALLOC(a,b)</td></tr>
     55 <tr><td nowrap align=right valign=top>#define&nbsp;</td><td valign=bottom><a class="el" href="group__osclmemory.html#a48">OSCL_AUDIT_REALLOC</a>(auditCB, ptr, new_size)&nbsp;&nbsp;&nbsp;_oscl_audit_realloc(ptr,new_size, auditCB)</td></tr>
     56 <tr><td nowrap align=right valign=top>#define&nbsp;</td><td valign=bottom><a class="el" href="group__osclmemory.html#a49">OSCL_FREE</a>(ptr)&nbsp;&nbsp;&nbsp;_oscl_audit_free(ptr)</td></tr>
     57 <tr><td nowrap align=right valign=top>#define&nbsp;</td><td valign=bottom><a class="el" href="group__osclmemory.html#a50">oscl_free</a>(x)&nbsp;&nbsp;&nbsp;OSCL_FREE(x)</td></tr>
     58 <tr><td nowrap align=right valign=top>#define&nbsp;</td><td valign=bottom><a class="el" href="group__osclmemory.html#a51">OSCL_DEFAULT_FREE</a>(x)&nbsp;&nbsp;&nbsp;OSCL_FREE(x)</td></tr>
     59 <tr><td nowrap align=right valign=top>#define&nbsp;</td><td valign=bottom><a class="el" href="group__osclmemory.html#a52">OSCL_NEW</a>(T, params)&nbsp;&nbsp;&nbsp;new T params</td></tr>
     60 <tr><td nowrap align=right valign=top>#define&nbsp;</td><td valign=bottom><a class="el" href="group__osclmemory.html#a53">OSCL_PLACEMENT_NEW</a>(ptr, constructor)&nbsp;&nbsp;&nbsp;new(ptr) constructor</td></tr>
     61 <tr><td nowrap align=right valign=top>#define&nbsp;</td><td valign=bottom><a class="el" href="group__osclmemory.html#a54">OSCL_TRAP_NEW</a>(T_ptr, T, params)&nbsp;&nbsp;&nbsp;_OSCL_TRAP_NEW(_oscl_default_audit_new(sizeof(T)),_oscl_audit_free,T_ptr,T,params)</td></tr>
     62 <tr><td nowrap align=right valign=top>#define&nbsp;</td><td valign=bottom><a class="el" href="group__osclmemory.html#a55">OSCL_AUDIT_NEW</a>(auditCB, T, params)&nbsp;&nbsp;&nbsp;new(_oscl_audit_new(sizeof(T),auditCB)) T params</td></tr>
     63 <tr><td nowrap align=right valign=top>#define&nbsp;</td><td valign=bottom><a class="el" href="group__osclmemory.html#a56">OSCL_TRAP_AUDIT_NEW</a>(T_ptr, auditCB, T, params)&nbsp;&nbsp;&nbsp;_OSCL_TRAP_NEW(_oscl_audit_new(sizeof(T),auditCB),_oscl_audit_free,T_ptr,T,params)</td></tr>
     64 <tr><td nowrap align=right valign=top>#define&nbsp;</td><td valign=bottom><a class="el" href="group__osclmemory.html#a57">OSCL_DELETE</a>(ptr)</td></tr>
     65 <tr><td nowrap align=right valign=top>#define&nbsp;</td><td valign=bottom><a class="el" href="group__osclmemory.html#a58">OSCL_AUDIT_ARRAY_NEW</a>(auditCB, T, count)&nbsp;&nbsp;&nbsp;new(_oscl_audit_new(sizeof(T)*(count),auditCB)) T</td></tr>
     66 <tr><td nowrap align=right valign=top>#define&nbsp;</td><td valign=bottom><a class="el" href="group__osclmemory.html#a59">OSCL_ARRAY_NEW</a>(T, count)&nbsp;&nbsp;&nbsp;new T[count]</td></tr>
     67 <tr><td nowrap align=right valign=top>#define&nbsp;</td><td valign=bottom><a class="el" href="group__osclmemory.html#a60">OSCL_ARRAY_DELETE</a>(ptr)&nbsp;&nbsp;&nbsp;delete [] ptr</td></tr>
     68 <tr><td nowrap align=right valign=top>#define&nbsp;</td><td valign=bottom><a class="el" href="oscl__mem_8h.html#a28">OSCL_DISABLE_WARNING_TRUNCATE_DEBUG_MESSAGE</a></td></tr>
     69 <tr><td nowrap align=right valign=top>#define&nbsp;</td><td valign=bottom><a class="el" href="group__osclmemory.html#a61">_OSCL_TRAP_NEW</a>(exp, freeFunc, T_ptr, T, params)</td></tr>
     70 <tr><td nowrap align=right valign=top>#define&nbsp;</td><td valign=bottom><a class="el" href="group__osclmemory.html#a62">_OSCL_CLEANUP_BASE_CLASS</a>(T)&nbsp;&nbsp;&nbsp;this-&gt;T::~T()</td></tr>
     71 <tr><td colspan=2><br><h2>Functions</h2></td></tr>
     72 <tr><td nowrap align=right valign=top>OSCL_COND_IMPORT_REF <a class="el" href="group__osclbase.html#a27">uint</a>&nbsp;</td><td valign=bottom><a class="el" href="group__osclmemory.html#a16">oscl_mem_aligned_size</a> (<a class="el" href="group__osclbase.html#a27">uint</a> size)</td></tr>
     73 <tr><td nowrap align=right valign=top>OSCL_IMPORT_REF void&nbsp;</td><td valign=bottom><a class="el" href="group__osclmemory.html#a17">OsclMemInit</a> (<a class="el" href="classOsclAuditCB.html">OsclAuditCB</a> &amp;auditCB)</td></tr>
     74 <tr><td nowrap align=right valign=top>OSCL_IMPORT_REF void *&nbsp;</td><td valign=bottom><a class="el" href="group__osclmemory.html#a18">_oscl_audit_malloc</a> (size_t, <a class="el" href="classOsclAuditCB.html">OsclAuditCB</a> &amp;, const char *f=NULL, const int l=0)</td></tr>
     75 <tr><td nowrap align=right valign=top>OSCL_IMPORT_REF void *&nbsp;</td><td valign=bottom><a class="el" href="group__osclmemory.html#a19">_oscl_audit_calloc</a> (size_t, size_t, <a class="el" href="classOsclAuditCB.html">OsclAuditCB</a> &amp;, const char *f=NULL, const int l=0)</td></tr>
     76 <tr><td nowrap align=right valign=top>OSCL_IMPORT_REF void *&nbsp;</td><td valign=bottom><a class="el" href="group__osclmemory.html#a20">_oscl_audit_realloc</a> (void *, size_t, <a class="el" href="classOsclAuditCB.html">OsclAuditCB</a> &amp;, const char *f=NULL, const int l=0)</td></tr>
     77 <tr><td nowrap align=right valign=top>OSCL_IMPORT_REF void *&nbsp;</td><td valign=bottom><a class="el" href="group__osclmemory.html#a21">_oscl_audit_new</a> (size_t, <a class="el" href="classOsclAuditCB.html">OsclAuditCB</a> &amp;, const char *f=NULL, const int l=0)</td></tr>
     78 <tr><td nowrap align=right valign=top>OSCL_IMPORT_REF void *&nbsp;</td><td valign=bottom><a class="el" href="group__osclmemory.html#a22">_oscl_default_audit_malloc</a> (size_t, const char *f=NULL, const int l=0)</td></tr>
     79 <tr><td nowrap align=right valign=top>OSCL_IMPORT_REF void *&nbsp;</td><td valign=bottom><a class="el" href="group__osclmemory.html#a23">_oscl_default_audit_calloc</a> (size_t, size_t, const char *f=NULL, const int l=0)</td></tr>
     80 <tr><td nowrap align=right valign=top>OSCL_IMPORT_REF void *&nbsp;</td><td valign=bottom><a class="el" href="group__osclmemory.html#a24">_oscl_default_audit_realloc</a> (void *, size_t, const char *f=NULL, const int l=0)</td></tr>
     81 <tr><td nowrap align=right valign=top>OSCL_IMPORT_REF void *&nbsp;</td><td valign=bottom><a class="el" href="group__osclmemory.html#a25">_oscl_default_audit_new</a> (size_t, const char *f=NULL, const int l=0)</td></tr>
     82 <tr><td nowrap align=right valign=top>OSCL_IMPORT_REF void&nbsp;</td><td valign=bottom><a class="el" href="group__osclmemory.html#a26">_oscl_audit_free</a> (void *)</td></tr>
     83 <tr><td nowrap align=right valign=top>void *&nbsp;</td><td valign=bottom><a class="el" href="group__osclmemory.html#a27">operator new</a> (size_t aSize, const char *aFile, int aLine)</td></tr>
     84 <tr><td nowrap align=right valign=top>void *&nbsp;</td><td valign=bottom><a class="el" href="oscl__mem_8h.html#a43">operator new</a> (size_t aSize)</td></tr>
     85 <tr><td nowrap align=right valign=top>void&nbsp;</td><td valign=bottom><a class="el" href="oscl__mem_8h.html#a44">operator delete</a> (void *aPtr)</td></tr>
     86 <tr><td nowrap align=right valign=top>void *&nbsp;</td><td valign=bottom><a class="el" href="group__osclmemory.html#a30">operator new[]</a> (size_t aSize, const char *aFile, int aLine)</td></tr>
     87 <tr><td nowrap align=right valign=top>void *&nbsp;</td><td valign=bottom><a class="el" href="group__osclmemory.html#a31">operator new[]</a> (size_t aSize)</td></tr>
     88 <tr><td nowrap align=right valign=top>void&nbsp;</td><td valign=bottom><a class="el" href="group__osclmemory.html#a32">operator delete[]</a> (void *aPtr)</td></tr>
     89 </table>
     90 <hr><a name="_details"></a><h2>Detailed Description</h2>
     91 This file contains basic memory definitions for common use across platforms.
     92 <p>
     93  This is the main entry point header file for the OSCL memory library. It should be the only one users directly include. Basic memory copy, compare, and move functions are defined here as well as the allocation functions.
     94 <p>
     95 <hr><h2>Define Documentation</h2>
     96 <a name="a28" doxytag="oscl_mem.h::OSCL_DISABLE_WARNING_TRUNCATE_DEBUG_MESSAGE"></a><p>
     97 <table width="100%" cellpadding="2" cellspacing="0" border="0">
     98   <tr>
     99     <td class="md">
    100       <table cellpadding="0" cellspacing="0" border="0">
    101         <tr>
    102           <td class="md" nowrap valign="top"> #define OSCL_DISABLE_WARNING_TRUNCATE_DEBUG_MESSAGE
    103       </table>
    104     </td>
    105   </tr>
    106 </table>
    107 <table cellspacing=5 cellpadding=0 border=0>
    108   <tr>
    109     <td>
    110       &nbsp;
    111     </td>
    112     <td>
    113 
    114 <p>
    115 Previously this was in oscl_mem_imp.h     </td>
    116   </tr>
    117 </table>
    118 <hr><h2>Function Documentation</h2>
    119 <a name="a44" doxytag="oscl_mem.h::operator delete"></a><p>
    120 <table width="100%" cellpadding="2" cellspacing="0" border="0">
    121   <tr>
    122     <td class="md">
    123       <table cellpadding="0" cellspacing="0" border="0">
    124         <tr>
    125           <td class="md" nowrap valign="top"> void operator delete </td>
    126           <td class="md" valign="top">(&nbsp;</td>
    127           <td class="md" nowrap valign="top">void *&nbsp;</td>
    128           <td class="mdname1" valign="top" nowrap>&nbsp; <em>aPtr</em>          </td>
    129           <td class="md" valign="top">)&nbsp;</td>
    130           <td class="md" nowrap><code> [inline]</code></td>
    131         </tr>
    132 
    133       </table>
    134     </td>
    135   </tr>
    136 </table>
    137 <table cellspacing=5 cellpadding=0 border=0>
    138   <tr>
    139     <td>
    140       &nbsp;
    141     </td>
    142     <td>
    143 
    144 <p>
    145     </td>
    146   </tr>
    147 </table>
    148 <a name="a43" doxytag="oscl_mem.h::operator new"></a><p>
    149 <table width="100%" cellpadding="2" cellspacing="0" border="0">
    150   <tr>
    151     <td class="md">
    152       <table cellpadding="0" cellspacing="0" border="0">
    153         <tr>
    154           <td class="md" nowrap valign="top"> void* operator new </td>
    155           <td class="md" valign="top">(&nbsp;</td>
    156           <td class="md" nowrap valign="top">size_t&nbsp;</td>
    157           <td class="mdname1" valign="top" nowrap>&nbsp; <em>aSize</em>          </td>
    158           <td class="md" valign="top">)&nbsp;</td>
    159           <td class="md" nowrap><code> [inline]</code></td>
    160         </tr>
    161 
    162       </table>
    163     </td>
    164   </tr>
    165 </table>
    166 <table cellspacing=5 cellpadding=0 border=0>
    167   <tr>
    168     <td>
    169       &nbsp;
    170     </td>
    171     <td>
    172 
    173 <p>
    174     </td>
    175   </tr>
    176 </table>
    177 <hr size="1"><img src="pvlogo_small.jpg"><address style="align: right;"><small>OSCL API</small>
    178 <address style="align: left;"><small>Posting Version: OPENCORE_20090310 </small>
    179 </small></address>
    180 </body>
    181 </html>
    182