<!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::AllocatorMalloc 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 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_1AllocatorMalloc.html">AllocatorMalloc</a></div> <h1>CS::Memory::AllocatorMalloc Class Reference</h1><!-- doxytag: class="CS::Memory::AllocatorMalloc" -->A default memory allocator that allocates with <a class="el" href="cssysdef_8h.html#bcc451ff5f6451f8b8bcbe91c762bcf0">cs_malloc()</a>. <a href="#_details">More...</a> <p> <code>#include <<a class="el" href="allocator_8h-source.html">csutil/allocator.h</a>></code> <p> Inherited by <a class="el" href="structCS_1_1Memory_1_1AllocatorPointerWrapper.html">CS::Memory::AllocatorPointerWrapper< const char *, CS::Memory::AllocatorMalloc ></a>, <a class="el" href="structCS_1_1Memory_1_1AllocatorPointerWrapper.html">CS::Memory::AllocatorPointerWrapper< CS::Debug::ProfileCounter *, CS::Memory::AllocatorMalloc ></a>, <a class="el" href="structCS_1_1Memory_1_1AllocatorPointerWrapper.html">CS::Memory::AllocatorPointerWrapper< CS::Debug::ProfileZone *, CS::Memory::AllocatorMalloc ></a>, <a class="el" href="structCS_1_1Memory_1_1AllocatorPointerWrapper.html">CS::Memory::AllocatorPointerWrapper< CS::SubRectangles::SubRect *, CS::Memory::AllocatorMalloc ></a>, <a class="el" href="structCS_1_1Memory_1_1AllocatorPointerWrapper.html">CS::Memory::AllocatorPointerWrapper< CS::Threading::Thread *, CS::Memory::AllocatorMalloc ></a>, <a class="el" href="structCS_1_1Memory_1_1AllocatorPointerWrapper.html">CS::Memory::AllocatorPointerWrapper< CS::Utility::ImportKit::Container::Material, CS::Memory::AllocatorMalloc ></a>, <a class="el" href="structCS_1_1Memory_1_1AllocatorPointerWrapper.html">CS::Memory::AllocatorPointerWrapper< CS::Utility::ImportKit::Container::Model, CS::Memory::AllocatorMalloc ></a>, <a class="el" href="structCS_1_1Memory_1_1AllocatorPointerWrapper.html">CS::Memory::AllocatorPointerWrapper< CS::Utility::ImportKit::Container::Model::Mesh, CS::Memory::AllocatorMalloc ></a>, <a class="el" href="structCS_1_1Memory_1_1AllocatorPointerWrapper.html">CS::Memory::AllocatorPointerWrapper< csArchive::ArchiveEntry *, CS::Memory::AllocatorMalloc ></a>, <a class="el" href="structCS_1_1Memory_1_1AllocatorPointerWrapper.html">CS::Memory::AllocatorPointerWrapper< csCollisionPair, CS::Memory::AllocatorMalloc ></a>, <a class="el" href="structCS_1_1Memory_1_1AllocatorPointerWrapper.html">CS::Memory::AllocatorPointerWrapper< csConfigIterator *, CS::Memory::AllocatorMalloc ></a>, <a class="el" href="structCS_1_1Memory_1_1AllocatorPointerWrapper.html">CS::Memory::AllocatorPointerWrapper< csEventOutlet *, CS::Memory::AllocatorMalloc ></a>, <a class="el" href="structCS_1_1Memory_1_1AllocatorPointerWrapper.html">CS::Memory::AllocatorPointerWrapper< csFontCache::KnownFont *, CS::Memory::AllocatorMalloc ></a>, <a class="el" href="structCS_1_1Memory_1_1AllocatorPointerWrapper.html">CS::Memory::AllocatorPointerWrapper< csGLFontCache::CacheTexture, CS::Memory::AllocatorMalloc ></a>, <a class="el" href="structCS_1_1Memory_1_1AllocatorPointerWrapper.html">CS::Memory::AllocatorPointerWrapper< csGLFontCache::TextJob, CS::Memory::AllocatorMalloc ></a>, <a class="el" href="structCS_1_1Memory_1_1AllocatorPointerWrapper.html">CS::Memory::AllocatorPointerWrapper< csGradientShade, CS::Memory::AllocatorMalloc ></a>, <a class="el" href="structCS_1_1Memory_1_1AllocatorPointerWrapper.html">CS::Memory::AllocatorPointerWrapper< csInputBinder::AxisCmd *, CS::Memory::AllocatorMalloc ></a>, <a class="el" href="structCS_1_1Memory_1_1AllocatorPointerWrapper.html">CS::Memory::AllocatorPointerWrapper< csInputBinder::BtnCmd *, CS::Memory::AllocatorMalloc ></a>, <a class="el" href="structCS_1_1Memory_1_1AllocatorPointerWrapper.html">CS::Memory::AllocatorPointerWrapper< csLightShaderVarCache::LightSvIdCacheEntry, CS::Memory::AllocatorMalloc ></a>, <a class="el" href="structCS_1_1Memory_1_1AllocatorPointerWrapper.html">CS::Memory::AllocatorPointerWrapper< csPathsList::Entry, CS::Memory::AllocatorMalloc ></a>, <a class="el" href="structCS_1_1Memory_1_1AllocatorPointerWrapper.html">CS::Memory::AllocatorPointerWrapper< csPen::point, CS::Memory::AllocatorMalloc ></a>, <a class="el" href="structCS_1_1Memory_1_1AllocatorPointerWrapper.html">CS::Memory::AllocatorPointerWrapper< csPixmap *, CS::Memory::AllocatorMalloc ></a>, <a class="el" href="structCS_1_1Memory_1_1AllocatorPointerWrapper.html">CS::Memory::AllocatorPointerWrapper< csPluginLoadRec *, CS::Memory::AllocatorMalloc ></a>, <a class="el" href="structCS_1_1Memory_1_1AllocatorPointerWrapper.html">CS::Memory::AllocatorPointerWrapper< csPluginManager::csPlugin *, CS::Memory::AllocatorMalloc ></a>, <a class="el" href="structCS_1_1Memory_1_1AllocatorPointerWrapper.html">CS::Memory::AllocatorPointerWrapper< csPluginManager::csPluginOption *, CS::Memory::AllocatorMalloc ></a>, <a class="el" href="structCS_1_1Memory_1_1AllocatorPointerWrapper.html">CS::Memory::AllocatorPointerWrapper< csPrintfFormatter::FmtParam, CS::Memory::AllocatorMalloc ></a>, <a class="el" href="structCS_1_1Memory_1_1AllocatorPointerWrapper.html">CS::Memory::AllocatorPointerWrapper< csPrintfFormatter::FormatSpec, CS::Memory::AllocatorMalloc ></a>, <a class="el" href="structCS_1_1Memory_1_1AllocatorPointerWrapper.html">CS::Memory::AllocatorPointerWrapper< csProfileInfo, CS::Memory::AllocatorMalloc ></a>, <a class="el" href="structCS_1_1Memory_1_1AllocatorPointerWrapper.html">CS::Memory::AllocatorPointerWrapper< csRect, CS::Memory::AllocatorMalloc ></a>, <a class="el" href="structCS_1_1Memory_1_1AllocatorPointerWrapper.html">CS::Memory::AllocatorPointerWrapper< csRef< iImage >, CS::Memory::AllocatorMalloc ></a>, <a class="el" href="structCS_1_1Memory_1_1AllocatorPointerWrapper.html">CS::Memory::AllocatorPointerWrapper< csRenderMeshList::meshListEntry, CS::Memory::AllocatorMalloc ></a>, <a class="el" href="structCS_1_1Memory_1_1AllocatorPointerWrapper.html">CS::Memory::AllocatorPointerWrapper< csRenderMeshList::renderMeshListInfo *, CS::Memory::AllocatorMalloc ></a>, <a class="el" href="structCS_1_1Memory_1_1AllocatorPointerWrapper.html">CS::Memory::AllocatorPointerWrapper< csReversibleTransform, CS::Memory::AllocatorMalloc ></a>, <a class="el" href="structCS_1_1Memory_1_1AllocatorPointerWrapper.html">CS::Memory::AllocatorPointerWrapper< csShaderProgram::VariableMapEntry, CS::Memory::AllocatorMalloc ></a>, <a class="el" href="structCS_1_1Memory_1_1AllocatorPointerWrapper.html">CS::Memory::AllocatorPointerWrapper< csShaderVariable *, CS::Memory::AllocatorMalloc ></a>, <a class="el" href="structCS_1_1Memory_1_1AllocatorPointerWrapper.html">CS::Memory::AllocatorPointerWrapper< csTreeNode *, CS::Memory::AllocatorMalloc ></a>, <a class="el" href="structCS_1_1Memory_1_1AllocatorPointerWrapper.html">CS::Memory::AllocatorPointerWrapper< csTriangle, CS::Memory::AllocatorMalloc ></a>, <a class="el" href="structCS_1_1Memory_1_1AllocatorPointerWrapper.html">CS::Memory::AllocatorPointerWrapper< csUserRenderBufferManager::userbuffer, CS::Memory::AllocatorMalloc ></a>, <a class="el" href="structCS_1_1Memory_1_1AllocatorPointerWrapper.html">CS::Memory::AllocatorPointerWrapper< csVector2, CS::Memory::AllocatorMalloc ></a>, <a class="el" href="structCS_1_1Memory_1_1AllocatorPointerWrapper.html">CS::Memory::AllocatorPointerWrapper< csVector3, CS::Memory::AllocatorMalloc ></a>, <a class="el" href="structCS_1_1Memory_1_1AllocatorPointerWrapper.html">CS::Memory::AllocatorPointerWrapper< csVector4, CS::Memory::AllocatorMalloc ></a>, <a class="el" href="structCS_1_1Memory_1_1AllocatorPointerWrapper.html">CS::Memory::AllocatorPointerWrapper< csWeakRef< T >, CS::Memory::AllocatorMalloc ></a>, <a class="el" href="structCS_1_1Memory_1_1AllocatorPointerWrapper.html">CS::Memory::AllocatorPointerWrapper< csWin32CustomCursors::CachedCursor, CS::Memory::AllocatorMalloc ></a>, <a class="el" href="structCS_1_1Memory_1_1AllocatorPointerWrapper.html">CS::Memory::AllocatorPointerWrapper< csWin32RegistryIterator *, CS::Memory::AllocatorMalloc ></a>, <a class="el" href="structCS_1_1Memory_1_1AllocatorPointerWrapper.html">CS::Memory::AllocatorPointerWrapper< DirectDetectionDevice, CS::Memory::AllocatorMalloc ></a>, <a class="el" href="structCS_1_1Memory_1_1AllocatorPointerWrapper.html">CS::Memory::AllocatorPointerWrapper< ElementArray, CS::Memory::AllocatorMalloc ></a>, <a class="el" href="structCS_1_1Memory_1_1AllocatorPointerWrapper.html">CS::Memory::AllocatorPointerWrapper< float, CS::Memory::AllocatorMalloc ></a>, <a class="el" href="structCS_1_1Memory_1_1AllocatorPointerWrapper.html">CS::Memory::AllocatorPointerWrapper< FrameData, CS::Memory::AllocatorMalloc ></a>, <a class="el" href="structCS_1_1Memory_1_1AllocatorPointerWrapper.html">CS::Memory::AllocatorPointerWrapper< iBase *, CS::Memory::AllocatorMalloc ></a>, <a class="el" href="structCS_1_1Memory_1_1AllocatorPointerWrapper.html">CS::Memory::AllocatorPointerWrapper< iConfigFile *, CS::Memory::AllocatorMalloc ></a>, <a class="el" href="structCS_1_1Memory_1_1AllocatorPointerWrapper.html">CS::Memory::AllocatorPointerWrapper< iConfigIterator *, CS::Memory::AllocatorMalloc ></a>, <a class="el" href="structCS_1_1Memory_1_1AllocatorPointerWrapper.html">CS::Memory::AllocatorPointerWrapper< iEventHandler *, CS::Memory::AllocatorMalloc ></a>, <a class="el" href="structCS_1_1Memory_1_1AllocatorPointerWrapper.html">CS::Memory::AllocatorPointerWrapper< iImage *, CS::Memory::AllocatorMalloc ></a>, <a class="el" href="structCS_1_1Memory_1_1AllocatorPointerWrapper.html">CS::Memory::AllocatorPointerWrapper< iMeshObject *, CS::Memory::AllocatorMalloc ></a>, <a class="el" href="structCS_1_1Memory_1_1AllocatorPointerWrapper.html">CS::Memory::AllocatorPointerWrapper< int, CS::Memory::AllocatorMalloc ></a>, <a class="el" href="structCS_1_1Memory_1_1AllocatorPointerWrapper.html">CS::Memory::AllocatorPointerWrapper< iObjectModelListener *, CS::Memory::AllocatorMalloc ></a>, <a class="el" href="structCS_1_1Memory_1_1AllocatorPointerWrapper.html">CS::Memory::AllocatorPointerWrapper< iObjectNameChangeListener *, CS::Memory::AllocatorMalloc ></a>, <a class="el" href="structCS_1_1Memory_1_1AllocatorPointerWrapper.html">CS::Memory::AllocatorPointerWrapper< iParticle *, CS::Memory::AllocatorMalloc ></a>, <a class="el" href="structCS_1_1Memory_1_1AllocatorPointerWrapper.html">CS::Memory::AllocatorPointerWrapper< iSndSysStreamCallback *, CS::Memory::AllocatorMalloc ></a>, <a class="el" href="structCS_1_1Memory_1_1AllocatorPointerWrapper.html">CS::Memory::AllocatorPointerWrapper< iSprite2DState *, CS::Memory::AllocatorMalloc ></a>, <a class="el" href="structCS_1_1Memory_1_1AllocatorPointerWrapper.html">CS::Memory::AllocatorPointerWrapper< iTextureHandle *, CS::Memory::AllocatorMalloc ></a>, <a class="el" href="structCS_1_1Memory_1_1AllocatorPointerWrapper.html">CS::Memory::AllocatorPointerWrapper< Node, CS::Memory::AllocatorMalloc ></a>, <a class="el" href="structCS_1_1Memory_1_1AllocatorPointerWrapper.html">CS::Memory::AllocatorPointerWrapper< size_t, CS::Memory::AllocatorMalloc ></a>, <a class="el" href="structCS_1_1Memory_1_1AllocatorPointerWrapper.html">CS::Memory::AllocatorPointerWrapper< T *, CS::Memory::AllocatorMalloc ></a>, <a class="el" href="structCS_1_1Memory_1_1AllocatorPointerWrapper.html">CS::Memory::AllocatorPointerWrapper< T, CS::Memory::AllocatorMalloc ></a>, <a class="el" href="structCS_1_1Memory_1_1AllocatorPointerWrapper.html">CS::Memory::AllocatorPointerWrapper< timerevent, CS::Memory::AllocatorMalloc ></a>, <a class="el" href="structCS_1_1Memory_1_1AllocatorPointerWrapper.html">CS::Memory::AllocatorPointerWrapper< unsigned char *, CS::Memory::AllocatorMalloc ></a>, and <a class="el" href="structCS_1_1Memory_1_1AllocatorPointerWrapper.html">CS::Memory::AllocatorPointerWrapper< unsigned int, CS::Memory::AllocatorMalloc ></a>. <p> <p> <a href="classCS_1_1Memory_1_1AllocatorMalloc-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_1AllocatorMalloc.html#fa17d40dbfdc7cf1b6d60ef3b827bc04">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="#fa17d40dbfdc7cf1b6d60ef3b827bc04"></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_1AllocatorMalloc.html#193aeb12cd9693952e567f62cdca8afe">Free</a> (void *p)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Free the block <code>p</code>. <a href="#193aeb12cd9693952e567f62cdca8afe"></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_1AllocatorMalloc.html#862553872b0e7205c02c76b1212886e3">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="#862553872b0e7205c02c76b1212886e3"></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_1AllocatorMalloc.html#917b34d5fc3507c18d86b9924f74e7dc">SetMemTrackerInfo</a> (const char *info)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Set the information used for memory tracking. <a href="#917b34d5fc3507c18d86b9924f74e7dc"></a><br></td></tr> </table> <hr><a name="_details"></a><h2>Detailed Description</h2> A default memory allocator that allocates with <a class="el" href="cssysdef_8h.html#bcc451ff5f6451f8b8bcbe91c762bcf0">cs_malloc()</a>. <p>Definition at line <a class="el" href="allocator_8h-source.html#l00039">39</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="fa17d40dbfdc7cf1b6d60ef3b827bc04"></a><!-- doxytag: member="CS::Memory::AllocatorMalloc::Alloc" ref="fa17d40dbfdc7cf1b6d60ef3b827bc04" args="(const size_t n)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void* CS::Memory::AllocatorMalloc::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#l00050">50</a> of file <a class="el" href="allocator_8h-source.html">allocator.h</a>.</p> <p>References <a class="el" href="cssysdef_8h-source.html#l00758">cs_malloc()</a>.</p> <p>Referenced by <a class="el" href="allocator_8h-source.html#l00076">Realloc()</a>.</p> </div> </div><p> <a class="anchor" name="193aeb12cd9693952e567f62cdca8afe"></a><!-- doxytag: member="CS::Memory::AllocatorMalloc::Free" ref="193aeb12cd9693952e567f62cdca8afe" args="(void *p)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void CS::Memory::AllocatorMalloc::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#l00063">63</a> of file <a class="el" href="allocator_8h-source.html">allocator.h</a>.</p> <p>References <a class="el" href="cssysdef_8h-source.html#l00760">cs_free()</a>.</p> </div> </div><p> <a class="anchor" name="862553872b0e7205c02c76b1212886e3"></a><!-- doxytag: member="CS::Memory::AllocatorMalloc::Realloc" ref="862553872b0e7205c02c76b1212886e3" args="(void *p, size_t newSize)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void* CS::Memory::AllocatorMalloc::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#l00076">76</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#l00050">Alloc()</a>, and <a class="el" href="cssysdef_8h-source.html#l00762">cs_realloc()</a>.</p> </div> </div><p> <a class="anchor" name="917b34d5fc3507c18d86b9924f74e7dc"></a><!-- doxytag: member="CS::Memory::AllocatorMalloc::SetMemTrackerInfo" ref="917b34d5fc3507c18d86b9924f74e7dc" args="(const char *info)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void CS::Memory::AllocatorMalloc::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#l00093">93</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>