<!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::AllocatorNewChar< Reallocatable > Class Template 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 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 Pages</span></a></li> </ul> </div> <div class="tabs"> <ul> <li><a href="classes.html"><span>Alphabetical List</span></a></li> <li><a href="annotated.html"><span>Class List</span></a></li> <li><a href="hierarchy.html"><span>Class Hierarchy</span></a></li> <li><a href="functions.html"><span>Class 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_1AllocatorNewChar.html">AllocatorNewChar</a></div> <h1>CS::Memory::AllocatorNewChar< Reallocatable > Class Template Reference</h1><!-- doxytag: class="CS::Memory::AllocatorNewChar" -->A default memory allocator that allocates using new char[]. <a href="#_details">More...</a> <p> <code>#include <<a class="el" href="allocator_8h-source.html">csutil/allocator.h</a>></code> <p> <p> <a href="classCS_1_1Memory_1_1AllocatorNewChar-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 * </td><td class="memItemRight" valign="bottom"><a class="el" href="classCS_1_1Memory_1_1AllocatorNewChar.html#b98488bdaf2123a63109ad58ce5a72af">Alloc</a> (const size_t n)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Allocate a block of memory of size <code>n</code>. <a href="#b98488bdaf2123a63109ad58ce5a72af"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classCS_1_1Memory_1_1AllocatorNewChar.html#f6ecccbadc0986c3a06949e57d94ca8b">Free</a> (void *p)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Free the block <code>p</code>. <a href="#f6ecccbadc0986c3a06949e57d94ca8b"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">void * </td><td class="memItemRight" valign="bottom"><a class="el" href="classCS_1_1Memory_1_1AllocatorNewChar.html#4b48261b650a74c55122f1573b327f6d">Realloc</a> (void *p, size_t newSize)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Resize the allocated block <code>p</code> to size <code>newSize</code>. <a href="#4b48261b650a74c55122f1573b327f6d"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classCS_1_1Memory_1_1AllocatorNewChar.html#89ee4c235459b571342b453650e3793f">SetMemTrackerInfo</a> (const char *info)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Set the information used for memory tracking. <a href="#89ee4c235459b571342b453650e3793f"></a><br></td></tr> </table> <hr><a name="_details"></a><h2>Detailed Description</h2> <h3>template<bool Reallocatable = true><br> class CS::Memory::AllocatorNewChar< Reallocatable ></h3> A default memory allocator that allocates using new char[]. <p> <code>Reallocatable</code> specifies whether <a class="el" href="classCS_1_1Memory_1_1AllocatorNewChar.html#4b48261b650a74c55122f1573b327f6d" title="Resize the allocated block p to size newSize.">Realloc()</a> should be supported. (This support incurs an overhead as the allocated size has to be stored.) <p>Definition at line <a class="el" href="allocator_8h-source.html#l00237">237</a> of file <a class="el" href="allocator_8h-source.html">allocator.h</a>.</p> <hr><h2>Member Function Documentation</h2> <a class="anchor" name="b98488bdaf2123a63109ad58ce5a72af"></a><!-- doxytag: member="CS::Memory::AllocatorNewChar::Alloc" ref="b98488bdaf2123a63109ad58ce5a72af" args="(const size_t n)" --> <div class="memitem"> <div class="memproto"> <div class="memtemplate"> template<bool Reallocatable = true> </div> <table class="memname"> <tr> <td class="memname">void* <a class="el" href="classCS_1_1Memory_1_1AllocatorNewChar.html">CS::Memory::AllocatorNewChar</a>< Reallocatable >::Alloc </td> <td>(</td> <td class="paramtype">const size_t </td> <td class="paramname"> <em>n</em> </td> <td> ) </td> <td width="100%"><code> [inline]</code></td> </tr> </table> </div> <div class="memdoc"> <p> Allocate a block of memory of size <code>n</code>. <p> <p>Definition at line <a class="el" href="allocator_8h-source.html#l00248">248</a> of file <a class="el" href="allocator_8h-source.html">allocator.h</a>.</p> <p>Referenced by <a class="el" href="allocator_8h-source.html#l00286">CS::Memory::AllocatorNewChar< Reallocatable >::Realloc()</a>.</p> </div> </div><p> <a class="anchor" name="f6ecccbadc0986c3a06949e57d94ca8b"></a><!-- doxytag: member="CS::Memory::AllocatorNewChar::Free" ref="f6ecccbadc0986c3a06949e57d94ca8b" args="(void *p)" --> <div class="memitem"> <div class="memproto"> <div class="memtemplate"> template<bool Reallocatable = true> </div> <table class="memname"> <tr> <td class="memname">void <a class="el" href="classCS_1_1Memory_1_1AllocatorNewChar.html">CS::Memory::AllocatorNewChar</a>< Reallocatable >::Free </td> <td>(</td> <td class="paramtype">void * </td> <td class="paramname"> <em>p</em> </td> <td> ) </td> <td width="100%"><code> [inline]</code></td> </tr> </table> </div> <div class="memdoc"> <p> Free the block <code>p</code>. <p> <p>Definition at line <a class="el" href="allocator_8h-source.html#l00266">266</a> of file <a class="el" href="allocator_8h-source.html">allocator.h</a>.</p> <p>Referenced by <a class="el" href="allocator_8h-source.html#l00286">CS::Memory::AllocatorNewChar< Reallocatable >::Realloc()</a>.</p> </div> </div><p> <a class="anchor" name="4b48261b650a74c55122f1573b327f6d"></a><!-- doxytag: member="CS::Memory::AllocatorNewChar::Realloc" ref="4b48261b650a74c55122f1573b327f6d" args="(void *p, size_t newSize)" --> <div class="memitem"> <div class="memproto"> <div class="memtemplate"> template<bool Reallocatable = true> </div> <table class="memname"> <tr> <td class="memname">void* <a class="el" href="classCS_1_1Memory_1_1AllocatorNewChar.html">CS::Memory::AllocatorNewChar</a>< Reallocatable >::Realloc </td> <td>(</td> <td class="paramtype">void * </td> <td class="paramname"> <em>p</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">size_t </td> <td class="paramname"> <em>newSize</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td width="100%"><code> [inline]</code></td> </tr> </table> </div> <div class="memdoc"> <p> Resize the allocated block <code>p</code> to size <code>newSize</code>. <p> <p>Definition at line <a class="el" href="allocator_8h-source.html#l00286">286</a> of file <a class="el" href="allocator_8h-source.html">allocator.h</a>.</p> <p>References <a class="el" href="allocator_8h-source.html#l00248">CS::Memory::AllocatorNewChar< Reallocatable >::Alloc()</a>, <a class="el" href="cssysdef_8h.html#98cf1ab82994ac8a7c2a25120f6f15d2">CS_ASSERT_MSG</a>, and <a class="el" href="allocator_8h-source.html#l00266">CS::Memory::AllocatorNewChar< Reallocatable >::Free()</a>.</p> </div> </div><p> <a class="anchor" name="89ee4c235459b571342b453650e3793f"></a><!-- doxytag: member="CS::Memory::AllocatorNewChar::SetMemTrackerInfo" ref="89ee4c235459b571342b453650e3793f" args="(const char *info)" --> <div class="memitem"> <div class="memproto"> <div class="memtemplate"> template<bool Reallocatable = true> </div> <table class="memname"> <tr> <td class="memname">void <a class="el" href="classCS_1_1Memory_1_1AllocatorNewChar.html">CS::Memory::AllocatorNewChar</a>< Reallocatable >::SetMemTrackerInfo </td> <td>(</td> <td class="paramtype">const char * </td> <td class="paramname"> <em>info</em> </td> <td> ) </td> <td width="100%"><code> [inline]</code></td> </tr> </table> </div> <div class="memdoc"> <p> Set the information used for memory tracking. <p> <p>Definition at line <a class="el" href="allocator_8h-source.html#l00309">309</a> of file <a class="el" href="allocator_8h-source.html">allocator.h</a>.</p> </div> </div><p> <hr>The documentation for this class was generated from the following file:<ul> <li>csutil/<a class="el" href="allocator_8h-source.html">allocator.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>