Sophie

Sophie

distrib > Mandriva > 2010.0 > i586 > media > contrib-release > by-pkgid > bad97183153701b09df5fae1052b1c30 > files > 114

crystalspace-doc-1.2.1-5mdv2010.0.i586.rpm

<!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>Crystal Space 1.2.1: CS::Memory::Heap Class Reference (Crystal Space 1.2.1 Public API Reference)</title>
<link href="tabs.css" rel="stylesheet" type="text/css">
<link href="doxygen.css" rel="stylesheet" type="text/css">
</head><body>
<table border="0" cellpadding="0" cellspacing="0" width="100%" class="head">
 <tr height="59">
  <td class="head" width="202" valign="bottom" style="padding-left:0;"><a href="http://www.crystalspace3d.org/"><img src="csblur.png" width="236" height="59" alt="CrystalSpace" border="0"></a></td>
  <td class="head"><h2>Public API Reference</h2></td>
 </tr>
 <tr height="11">
  <td colspan="2" class="headshadow" valign="top" style="padding-left:0;"><img src="csblurb.png" width="236" height="11" alt="" border="0"></td>
 </tr>
</table>
<div class="content">
<!-- Generated by Doxygen 1.5.3 -->
<div class="tabs">
  <ul>
    <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
    <li><a href="modules.html"><span>Modules</span></a></li>
    <li><a href="namespaces.html"><span>Namespaces</span></a></li>
    <li class="current"><a href="classes.html"><span>Classes</span></a></li>
    <li><a href="files.html"><span>Files</span></a></li>
    <li><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>
  </ul>
</div>
<div class="tabs">
  <ul>
    <li><a href="classes.html"><span>Alphabetical&nbsp;List</span></a></li>
    <li><a href="annotated.html"><span>Class&nbsp;List</span></a></li>
    <li><a href="hierarchy.html"><span>Class&nbsp;Hierarchy</span></a></li>
    <li><a href="functions.html"><span>Class&nbsp;Members</span></a></li>
  </ul>
</div>
<div class="nav">
<a class="el" href="namespaceCS.html">CS</a>::<a class="el" href="namespaceCS_1_1Memory.html">Memory</a>::<a class="el" href="classCS_1_1Memory_1_1Heap.html">Heap</a></div>
<h1>CS::Memory::Heap Class Reference</h1><!-- doxytag: class="CS::Memory::Heap" -->A separate heap from which memory can be allocated.  
<a href="#_details">More...</a>
<p>
<code>#include &lt;<a class="el" href="memheap_8h-source.html">csutil/memheap.h</a>&gt;</code>
<p>

<p>
<a href="classCS_1_1Memory_1_1Heap-members.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">void *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classCS_1_1Memory_1_1Heap.html#8a52d84e6a5e9e95a9b4e1cc90c0a80a">Alloc</a> (const size_t n)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Allocate a block of memory of size <code>n</code>.  <a href="#8a52d84e6a5e9e95a9b4e1cc90c0a80a"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">size_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classCS_1_1Memory_1_1Heap.html#4c1d12c06e74f3372f97cebd2efde576">Footprint</a> ()</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Return the total amount of memory used for this heap.  <a href="#4c1d12c06e74f3372f97cebd2efde576"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classCS_1_1Memory_1_1Heap.html#9a1d94499a562e232c99ecf9c88dcc76">Free</a> (void *p)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Free the block <code>p</code>.  <a href="#9a1d94499a562e232c99ecf9c88dcc76"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classCS_1_1Memory_1_1Heap.html#14e49de03ced0e98cb9f3397af3e02e7">Realloc</a> (void *p, size_t newSize)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Resize the allocated block <code>p</code> to size <code>newSize</code>.  <a href="#14e49de03ced0e98cb9f3397af3e02e7"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classCS_1_1Memory_1_1Heap.html#1f66ec49b5d6f68f4dba908de9a53803">Trim</a> (size_t pad=0)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Try to return as much unused memory to the system as possible.  <a href="#1f66ec49b5d6f68f4dba908de9a53803"></a><br></td></tr>
</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
A separate heap from which memory can be allocated. 
<p>
<dl class="remark" compact><dt><b>Remarks:</b></dt><dd><a class="el" href="namespaceCS_1_1Memory.html" title="Memory allocation.">Memory</a> must be freed by the same heap it was allocated from. <p>
Thread-safe. </dd></dl>

<p>Definition at line <a class="el" href="memheap_8h-source.html#l00046">46</a> of file <a class="el" href="memheap_8h-source.html">memheap.h</a>.</p>
<hr><h2>Member Function Documentation</h2>
<a class="anchor" name="8a52d84e6a5e9e95a9b4e1cc90c0a80a"></a><!-- doxytag: member="CS::Memory::Heap::Alloc" ref="8a52d84e6a5e9e95a9b4e1cc90c0a80a" args="(const size_t n)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void* CS::Memory::Heap::Alloc           </td>
          <td>(</td>
          <td class="paramtype">const size_t&nbsp;</td>
          <td class="paramname"> <em>n</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Allocate a block of memory of size <code>n</code>. 
<p>

</div>
</div><p>
<a class="anchor" name="4c1d12c06e74f3372f97cebd2efde576"></a><!-- doxytag: member="CS::Memory::Heap::Footprint" ref="4c1d12c06e74f3372f97cebd2efde576" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">size_t CS::Memory::Heap::Footprint           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Return the total amount of memory used for this heap. 
<p>

</div>
</div><p>
<a class="anchor" name="9a1d94499a562e232c99ecf9c88dcc76"></a><!-- doxytag: member="CS::Memory::Heap::Free" ref="9a1d94499a562e232c99ecf9c88dcc76" args="(void *p)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void CS::Memory::Heap::Free           </td>
          <td>(</td>
          <td class="paramtype">void *&nbsp;</td>
          <td class="paramname"> <em>p</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Free the block <code>p</code>. 
<p>

</div>
</div><p>
<a class="anchor" name="14e49de03ced0e98cb9f3397af3e02e7"></a><!-- doxytag: member="CS::Memory::Heap::Realloc" ref="14e49de03ced0e98cb9f3397af3e02e7" args="(void *p, size_t newSize)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void* CS::Memory::Heap::Realloc           </td>
          <td>(</td>
          <td class="paramtype">void *&nbsp;</td>
          <td class="paramname"> <em>p</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&nbsp;</td>
          <td class="paramname"> <em>newSize</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Resize the allocated block <code>p</code> to size <code>newSize</code>. 
<p>

</div>
</div><p>
<a class="anchor" name="1f66ec49b5d6f68f4dba908de9a53803"></a><!-- doxytag: member="CS::Memory::Heap::Trim" ref="1f66ec49b5d6f68f4dba908de9a53803" args="(size_t pad=0)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void CS::Memory::Heap::Trim           </td>
          <td>(</td>
          <td class="paramtype">size_t&nbsp;</td>
          <td class="paramname"> <em>pad</em> = <code>0</code>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Try to return as much unused memory to the system as possible. 
<p>
<code>pad</code> optionally specifies a minimum amount of memory to be retained, in case future allocations are anticipated. 
</div>
</div><p>
<hr>The documentation for this class was generated from the following file:<ul>
<li>csutil/<a class="el" href="memheap_8h-source.html">memheap.h</a></ul>
<hr size="1"><address><small>Generated for Crystal Space 1.2.1 by 
<a href="http://www.doxygen.org/index.html">doxygen</a> 1.5.3 
</small></address> </div></body> </html>