⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 a00075.html

📁 mpeg4编解码器
💻 HTML
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"><title>Sklmp4 MPEG-4 library: SKL_MEM_I class Reference</title><link href="doxygen.css" rel="stylesheet" type="text/css"></head><body><!-- Generated by Doxygen 1.3.4 --><div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="hierarchy.html">Class&nbsp;Hierarchy</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div><h1>SKL_MEM_I Class Reference</h1><code>#include &lt;skl.h&gt;</code><p><a href="a00002.html">List of all members.</a><table border=0 cellpadding=0 cellspacing=0><tr><td></td></tr><tr><td colspan=2><br><h2>Public Member Functions</h2></td></tr><tr><td class="memItemLeft" nowrap align=right valign=top>virtual <a class="el" href="a00096.html#a17">SKL_ANY</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a00075.html#a2">New</a> (const  size_t Size)</td></tr><tr><td class="memItemLeft" nowrap align=right valign=top>virtual void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a00075.html#a3">Delete</a> (const  <a class="el" href="a00096.html#a17">SKL_ANY</a> p, size_t Size)</td></tr><tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a00075.html#a4">Realloc</a> (<a class="el" href="a00096.html#a17">SKL_ANY</a> &amp;Ptr, const  size_t Size, const  size_t Old_Size=0)</td></tr></table><hr><a name="_details"></a><h2>Detailed Description</h2>Instance of this class should provide interface for memory allocation and disallocation. The default implementation uses malloc() / free() low-level calls.<br> A new-with-placement operator is defined, taking the memory pool as placement data. You can then use: new (Mem) MY_CLASS to allocate MY_CLASS on the SKL_MEM_I *Mem memory pool. <br> For convenience, a default global static instance of SKL_MEM_I is available as: SKL_MEM_I *SKL_MEM.<br> <p><hr><h2>Member Function Documentation</h2><a class="anchor" name="a3" doxytag="SKL_MEM_I::Delete" ></a><p><table class="mdTable" width="100%" cellpadding="2" cellspacing="0">  <tr>    <td class="mdRow">      <table cellpadding="0" cellspacing="0" border="0">        <tr>          <td class="md" nowrap valign="top"> virtual void SKL_MEM_I::Delete </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top">const <a class="el" href="a00096.html#a17">SKL_ANY</a>&nbsp;</td>          <td class="mdname" nowrap> <em>p</em>, </td>        </tr>        <tr>          <td></td>          <td></td>          <td class="md" nowrap>size_t&nbsp;</td>          <td class="mdname" nowrap> <em>Size</em></td>        </tr>        <tr>          <td></td>          <td class="md">)&nbsp;</td>          <td class="md" colspan="2"><code> [virtual]</code></td>        </tr>      </table>    </td>  </tr></table><table cellspacing=5 cellpadding=0 border=0>  <tr>    <td>      &nbsp;    </td>    <td><p>This function should disallocate the memory segment pointed to by the 'p' parameter, and of size 'Size'. <dl compact><dt><b>Parameters:</b></dt><dd>  <table border="0" cellspacing="2" cellpadding="0">    <tr><td valign=top><em>p</em>&nbsp;</td><td>Pointer to the memory segment. This pointer should have been obtained by a call to <a class="el" href="a00075.html#a2">New()</a> member function. </td></tr>    <tr><td valign=top><em>Size</em>&nbsp;</td><td>size of the memory to be freed. This size *must* match the size that was passed to the corresponding <a class="el" href="a00075.html#a2">New()</a> call as argument. </td></tr>  </table></dl>    </td>  </tr></table><a class="anchor" name="a2" doxytag="SKL_MEM_I::New" ></a><p><table class="mdTable" width="100%" cellpadding="2" cellspacing="0">  <tr>    <td class="mdRow">      <table cellpadding="0" cellspacing="0" border="0">        <tr>          <td class="md" nowrap valign="top"> virtual <a class="el" href="a00096.html#a17">SKL_ANY</a> SKL_MEM_I::New </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top">const size_t&nbsp;</td>          <td class="mdname1" valign="top" nowrap> <em>Size</em>          </td>          <td class="md" valign="top">&nbsp;)&nbsp;</td>          <td class="md" nowrap><code> [virtual]</code></td>        </tr>      </table>    </td>  </tr></table><table cellspacing=5 cellpadding=0 border=0>  <tr>    <td>      &nbsp;    </td>    <td><p>This function should return a pointer to a freshly allocation memory segment of at least 'Size' size. It returns 0 if allocation was not possible. <dl compact><dt><b>Parameters:</b></dt><dd>  <table border="0" cellspacing="2" cellpadding="0">    <tr><td valign=top><em>Size</em>&nbsp;</td><td>the desired size to be allocated. </td></tr>  </table></dl>    </td>  </tr></table><a class="anchor" name="a4" doxytag="SKL_MEM_I::Realloc" ></a><p><table class="mdTable" width="100%" cellpadding="2" cellspacing="0">  <tr>    <td class="mdRow">      <table cellpadding="0" cellspacing="0" border="0">        <tr>          <td class="md" nowrap valign="top"> void SKL_MEM_I::Realloc </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top"><a class="el" href="a00096.html#a17">SKL_ANY</a> &amp;&nbsp;</td>          <td class="mdname" nowrap> <em>Ptr</em>, </td>        </tr>        <tr>          <td></td>          <td></td>          <td class="md" nowrap>const size_t&nbsp;</td>          <td class="mdname" nowrap> <em>Size</em>, </td>        </tr>        <tr>          <td></td>          <td></td>          <td class="md" nowrap>const size_t&nbsp;</td>          <td class="mdname" nowrap> <em>Old_Size</em> = 0</td>        </tr>        <tr>          <td></td>          <td class="md">)&nbsp;</td>          <td class="md" colspan="2"></td>        </tr>      </table>    </td>  </tr></table><table cellspacing=5 cellpadding=0 border=0>  <tr>    <td>      &nbsp;    </td>    <td><p>This function re-allocates, without copying its content, a memory segment of size 'Old_Size' referenced by 'Ptr'. The new size is passed a 'Size' argument.     </td>  </tr></table><hr>The documentation for this class was generated from the following file:<ul><li><a class="el" href="a00096.html">skl.h</a></ul><hr size="1"><address style="align: right;"><small>Generated on Mon Nov 24 19:13:13 2003 for Sklmp4 MPEG-4 library by<a href="http://www.doxygen.org/index.html"><img src="doxygen.png" alt="doxygen" align="middle" border=0 > </a>1.3.4 </small></address></body></html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -