gnuk/ChibiOS_2.0.6/docs/html/group__pools.html
2010-11-22 14:53:37 +09:00

413 lines
23 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>ChibiOS/RT: Memory Pools</title>
<link href="custom.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
</head><body>
<table style="text-align: center; width: 100%;" border="0"
cellpadding="2" cellspacing="2">
<tbody>
<tr>
<td style="width: 80px;"><img alt="ChibiOS/RT Logo" src="logo_small.png"></td>
<td><big><big>ChibiOS/RT</big></big><br><br>Architecture - Reference Manual - Guides</td>
<td style="width: 80px;"></td>
</tr>
</tbody>
</table>
<hr size="1">
<!-- Generated by Doxygen 1.7.1 -->
<div class="navigation" id="top">
<div class="tabs">
<ul class="tablist">
<li><a href="main.html"><span>Main&nbsp;Page</span></a></li>
<li><a href="modules.html"><span>Modules</span></a></li>
<li><a href="annotated.html"><span>Data&nbsp;Structures</span></a></li>
<li><a href="files.html"><span>Files</span></a></li>
</ul>
</div>
</div>
<div class="header">
<div class="summary">
<a href="#nested-classes">Data Structures</a> &#124;
<a href="#define-members">Defines</a> &#124;
<a href="#func-members">Functions</a> </div>
<div class="headertitle">
<h1>Memory Pools<br/>
<small>
[<a class="el" href="group__memory.html">Memory Management</a>]</small>
</h1> </div>
</div>
<div class="contents">
<p><div class="dynheader">
Collaboration diagram for Memory Pools:</div>
<div class="dyncontent">
<center><table><tr><td><img src="group__pools.png" border="0" alt="" usemap="#group____pools"/>
<map name="group____pools" id="group____pools">
<area shape="rect" id="node2" href="group__memory.html" title="Memory Management" alt="" coords="7,5,129,32"/>
</map>
</td></tr></table></center>
</div>
</p>
<hr/><a name="_details"></a><h2>Description</h2>
<p>Memory Pools related APIs and services. </p>
<h2>Operation mode</h2>
<p>The Memory Pools APIs allow to allocate/free fixed size objects in <b>constant time</b> and reliably without memory fragmentation problems.<br/>
In order to use the memory pools APIs the <code>CH_USE_MEMPOOLS</code> option must be enabled in <code><a class="el" href="chconf_8h.html" title="Configuration file template.">chconf.h</a></code>. </p>
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="nested-classes"></a>
Data Structures</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">struct &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structpool__header.html">pool_header</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Memory pool free object header. <a href="structpool__header.html#_details">More...</a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">struct &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_memory_pool.html">MemoryPool</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Memory pool descriptor. <a href="struct_memory_pool.html#_details">More...</a><br/></td></tr>
<tr><td colspan="2"><h2><a name="define-members"></a>
Defines</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__pools.html#gac180dea0bb5ebc413ff8c8cfdab7369f">_MEMORYPOOL_DATA</a>(name, size, provider)&nbsp;&nbsp;&nbsp;{NULL, MEM_ALIGN_SIZE(size), provider}</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Data part of a static memory pool initializer. <a href="#gac180dea0bb5ebc413ff8c8cfdab7369f"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__pools.html#ga498d53232821de6ce2e3e150c76202f2">MEMORYPOOL_DECL</a>(name, size, provider)&nbsp;&nbsp;&nbsp;<a class="el" href="struct_memory_pool.html">MemoryPool</a> name = _MEMORYPOOL_DATA(name, size, provider)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Static memory pool initializer in hungry mode. <a href="#ga498d53232821de6ce2e3e150c76202f2"></a><br/></td></tr>
<tr><td colspan="2"><h2><a name="func-members"></a>
Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__pools.html#ga9c53c25a5ae60930534cde8620775781">chPoolInit</a> (<a class="el" href="struct_memory_pool.html">MemoryPool</a> *mp, size_t size, <a class="el" href="group__memcore.html#ga4fb77ad6b1053341257948231799b4ad">memgetfunc_t</a> provider)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Initializes an empty memory pool. <a href="#ga9c53c25a5ae60930534cde8620775781"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__pools.html#ga152fb3460d6b7426f0b6803bb38a0070">chPoolAllocI</a> (<a class="el" href="struct_memory_pool.html">MemoryPool</a> *mp)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Allocates an object from a memory pool. <a href="#ga152fb3460d6b7426f0b6803bb38a0070"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__pools.html#gab86190d70893fe708c75570af6720bd5">chPoolAlloc</a> (<a class="el" href="struct_memory_pool.html">MemoryPool</a> *mp)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Allocates an object from a memory pool. <a href="#gab86190d70893fe708c75570af6720bd5"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__pools.html#gab5c6c04fd14fbeee2183ca955371c515">chPoolFreeI</a> (<a class="el" href="struct_memory_pool.html">MemoryPool</a> *mp, void *objp)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Releases (or adds) an object into (to) a memory pool. <a href="#gab5c6c04fd14fbeee2183ca955371c515"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__pools.html#ga978f8d038e8e981bf9e5a104b81c6cb6">chPoolFree</a> (<a class="el" href="struct_memory_pool.html">MemoryPool</a> *mp, void *objp)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Releases (or adds) an object into (to) a memory pool. <a href="#ga978f8d038e8e981bf9e5a104b81c6cb6"></a><br/></td></tr>
</table>
<hr/><h2>Define Documentation</h2>
<a class="anchor" id="gac180dea0bb5ebc413ff8c8cfdab7369f"></a><!-- doxytag: member="chmempools.h::_MEMORYPOOL_DATA" ref="gac180dea0bb5ebc413ff8c8cfdab7369f" args="(name, size, provider)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define _MEMORYPOOL_DATA</td>
<td>(</td>
<td class="paramtype">&nbsp;</td>
<td class="paramname">name, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">&nbsp;</td>
<td class="paramname">size, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">&nbsp;</td>
<td class="paramname">provider</td><td>&nbsp;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td>&nbsp;&nbsp;&nbsp;{NULL, MEM_ALIGN_SIZE(size), provider}</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Data part of a static memory pool initializer. </p>
<p>This macro should be used when statically initializing a memory pool that is part of a bigger structure.</p>
<dl><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>name</em>&nbsp;</td><td>the name of the memory pool variable </td></tr>
<tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>size</em>&nbsp;</td><td>size of the memory pool contained objects </td></tr>
<tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>provider</em>&nbsp;</td><td>memory provider function for the memory pool </td></tr>
</table>
</dd>
</dl>
<p>Definition at line <a class="el" href="chmempools_8h_source.html#l00068">68</a> of file <a class="el" href="chmempools_8h_source.html">chmempools.h</a>.</p>
</div>
</div>
<a class="anchor" id="ga498d53232821de6ce2e3e150c76202f2"></a><!-- doxytag: member="chmempools.h::MEMORYPOOL_DECL" ref="ga498d53232821de6ce2e3e150c76202f2" args="(name, size, provider)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define MEMORYPOOL_DECL</td>
<td>(</td>
<td class="paramtype">&nbsp;</td>
<td class="paramname">name, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">&nbsp;</td>
<td class="paramname">size, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">&nbsp;</td>
<td class="paramname">provider</td><td>&nbsp;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td>&nbsp;&nbsp;&nbsp;<a class="el" href="struct_memory_pool.html">MemoryPool</a> name = _MEMORYPOOL_DATA(name, size, provider)</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Static memory pool initializer in hungry mode. </p>
<p>Statically initialized memory pools require no explicit initialization using <code><a class="el" href="group__pools.html#ga9c53c25a5ae60930534cde8620775781" title="Initializes an empty memory pool.">chPoolInit()</a></code>.</p>
<dl><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>name</em>&nbsp;</td><td>the name of the memory pool variable </td></tr>
<tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>size</em>&nbsp;</td><td>size of the memory pool contained objects </td></tr>
<tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>provider</em>&nbsp;</td><td>memory provider function for the memory pool or <code>NULL</code> if the pool is not allowed to grow automatically </td></tr>
</table>
</dd>
</dl>
<p>Definition at line <a class="el" href="chmempools_8h_source.html#l00081">81</a> of file <a class="el" href="chmempools_8h_source.html">chmempools.h</a>.</p>
</div>
</div>
<hr/><h2>Function Documentation</h2>
<a class="anchor" id="ga9c53c25a5ae60930534cde8620775781"></a><!-- doxytag: member="chmempools.h::chPoolInit" ref="ga9c53c25a5ae60930534cde8620775781" args="(MemoryPool *mp, size_t size, memgetfunc_t provider)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void chPoolInit </td>
<td>(</td>
<td class="paramtype"><a class="el" href="struct_memory_pool.html">MemoryPool</a> *&nbsp;</td>
<td class="paramname"> <em>mp</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">size_t&nbsp;</td>
<td class="paramname"> <em>size</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="group__memcore.html#ga4fb77ad6b1053341257948231799b4ad">memgetfunc_t</a>&nbsp;</td>
<td class="paramname"> <em>provider</em></td><td>&nbsp;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Initializes an empty memory pool. </p>
<dl class="note"><dt><b>Note:</b></dt><dd>The size is internally aligned to be a multiple of the <code>align_t</code> type size.</dd></dl>
<dl><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"><tt>[out]</tt>&nbsp;</td><td valign="top"><em>mp</em>&nbsp;</td><td>pointer to a <code><a class="el" href="struct_memory_pool.html" title="Memory pool descriptor.">MemoryPool</a></code> structure </td></tr>
<tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>size</em>&nbsp;</td><td>the size of the objects contained in this memory pool, the minimum accepted size is the size of a pointer to void. </td></tr>
<tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>provider</em>&nbsp;</td><td>memory provider function for the memory pool or <code>NULL</code> if the pool is not allowed to grow automatically </td></tr>
</table>
</dd>
</dl>
<p>Definition at line <a class="el" href="chmempools_8c_source.html#l00058">58</a> of file <a class="el" href="chmempools_8c_source.html">chmempools.c</a>.</p>
<p>References <a class="el" href="group__debug.html#ga6bb6c0f97caab3a66332c8bfbf7a3844">chDbgCheck</a>, <a class="el" href="group__memcore.html#ga216a7738be23e0caa9d18e510eb795eb">MEM_ALIGN_SIZE</a>, <a class="el" href="struct_memory_pool.html#ac1cf32748cc712049b503c2b00f99167">MemoryPool::mp_next</a>, <a class="el" href="struct_memory_pool.html#a962ca1e05036d54213b3a0eeaebb0ec6">MemoryPool::mp_object_size</a>, and <a class="el" href="struct_memory_pool.html#aa4b7af734cdd6976445d3502d6914428">MemoryPool::mp_provider</a>.</p>
</div>
</div>
<a class="anchor" id="ga152fb3460d6b7426f0b6803bb38a0070"></a><!-- doxytag: member="chmempools.h::chPoolAllocI" ref="ga152fb3460d6b7426f0b6803bb38a0070" args="(MemoryPool *mp)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void * chPoolAllocI </td>
<td>(</td>
<td class="paramtype"><a class="el" href="struct_memory_pool.html">MemoryPool</a> *&nbsp;</td>
<td class="paramname"> <em>mp</em></td>
<td>&nbsp;)&nbsp;</td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Allocates an object from a memory pool. </p>
<dl><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>mp</em>&nbsp;</td><td>pointer to a <code><a class="el" href="struct_memory_pool.html" title="Memory pool descriptor.">MemoryPool</a></code> structure </td></tr>
</table>
</dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>The pointer to the allocated object. </dd></dl>
<dl><dt><b>Return values:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>NULL</em>&nbsp;</td><td>if pool is empty. </td></tr>
</table>
</dd>
</dl>
<p>Definition at line <a class="el" href="chmempools_8c_source.html#l00074">74</a> of file <a class="el" href="chmempools_8c_source.html">chmempools.c</a>.</p>
<p>References <a class="el" href="group__debug.html#ga6bb6c0f97caab3a66332c8bfbf7a3844">chDbgCheck</a>, <a class="el" href="struct_memory_pool.html#ac1cf32748cc712049b503c2b00f99167">MemoryPool::mp_next</a>, <a class="el" href="struct_memory_pool.html#a962ca1e05036d54213b3a0eeaebb0ec6">MemoryPool::mp_object_size</a>, <a class="el" href="struct_memory_pool.html#aa4b7af734cdd6976445d3502d6914428">MemoryPool::mp_provider</a>, and <a class="el" href="structpool__header.html#aac699414c648388563597a56e34adeb4">pool_header::ph_next</a>.</p>
<p>Referenced by <a class="el" href="group__pools.html#gab86190d70893fe708c75570af6720bd5">chPoolAlloc()</a>.</p>
</div>
</div>
<a class="anchor" id="gab86190d70893fe708c75570af6720bd5"></a><!-- doxytag: member="chmempools.h::chPoolAlloc" ref="gab86190d70893fe708c75570af6720bd5" args="(MemoryPool *mp)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void * chPoolAlloc </td>
<td>(</td>
<td class="paramtype"><a class="el" href="struct_memory_pool.html">MemoryPool</a> *&nbsp;</td>
<td class="paramname"> <em>mp</em></td>
<td>&nbsp;)&nbsp;</td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Allocates an object from a memory pool. </p>
<dl><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>mp</em>&nbsp;</td><td>pointer to a <code><a class="el" href="struct_memory_pool.html" title="Memory pool descriptor.">MemoryPool</a></code> structure </td></tr>
</table>
</dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>The pointer to the allocated object. </dd></dl>
<dl><dt><b>Return values:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>NULL</em>&nbsp;</td><td>if pool is empty. </td></tr>
</table>
</dd>
</dl>
<p>Definition at line <a class="el" href="chmempools_8c_source.html#l00095">95</a> of file <a class="el" href="chmempools_8c_source.html">chmempools.c</a>.</p>
<p>References <a class="el" href="group__pools.html#ga152fb3460d6b7426f0b6803bb38a0070">chPoolAllocI()</a>, <a class="el" href="group__system.html#ga9f6573c0763d1e4e97c63c62edad6e42">chSysLock</a>, and <a class="el" href="group__system.html#ga5a257fa58a09815eb64a45e2dfbdc22e">chSysUnlock</a>.</p>
<p>Referenced by <a class="el" href="group__threads.html#gad3ccc1a6f054c543258ed2fe97ed2f58">chThdCreateFromMemoryPool()</a>.</p>
<p><div class="dynheader">
Here is the call graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="group__pools_gab86190d70893fe708c75570af6720bd5_cgraph.png" border="0" usemap="#group__pools_gab86190d70893fe708c75570af6720bd5_cgraph" alt=""/></div>
<map name="group__pools_gab86190d70893fe708c75570af6720bd5_cgraph" id="group__pools_gab86190d70893fe708c75570af6720bd5_cgraph">
<area shape="rect" id="node3" href="group__pools.html#ga152fb3460d6b7426f0b6803bb38a0070" title="Allocates an object from a memory pool." alt="" coords="133,5,213,32"/>
</map>
</div>
</p>
</div>
</div>
<a class="anchor" id="gab5c6c04fd14fbeee2183ca955371c515"></a><!-- doxytag: member="chmempools.h::chPoolFreeI" ref="gab5c6c04fd14fbeee2183ca955371c515" args="(MemoryPool *mp, void *objp)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void chPoolFreeI </td>
<td>(</td>
<td class="paramtype"><a class="el" href="struct_memory_pool.html">MemoryPool</a> *&nbsp;</td>
<td class="paramname"> <em>mp</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">void *&nbsp;</td>
<td class="paramname"> <em>objp</em></td><td>&nbsp;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Releases (or adds) an object into (to) a memory pool. </p>
<dl class="note"><dt><b>Note:</b></dt><dd>The object is assumed to be of the right size for the specified memory pool. </dd>
<dd>
The object is assumed to be memory aligned to the size of <code>align_t</code> type.</dd></dl>
<dl><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>mp</em>&nbsp;</td><td>pointer to a <code><a class="el" href="struct_memory_pool.html" title="Memory pool descriptor.">MemoryPool</a></code> structure </td></tr>
<tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>objp</em>&nbsp;</td><td>the pointer to the object to be released or added </td></tr>
</table>
</dd>
</dl>
<p>Definition at line <a class="el" href="chmempools_8c_source.html#l00114">114</a> of file <a class="el" href="chmempools_8c_source.html">chmempools.c</a>.</p>
<p>References <a class="el" href="group__debug.html#ga6bb6c0f97caab3a66332c8bfbf7a3844">chDbgCheck</a>, <a class="el" href="group__memcore.html#gac38a64d9001b24d62f1c9ab79fbc328b">MEM_IS_ALIGNED</a>, <a class="el" href="struct_memory_pool.html#ac1cf32748cc712049b503c2b00f99167">MemoryPool::mp_next</a>, and <a class="el" href="structpool__header.html#aac699414c648388563597a56e34adeb4">pool_header::ph_next</a>.</p>
<p>Referenced by <a class="el" href="group__pools.html#ga978f8d038e8e981bf9e5a104b81c6cb6">chPoolFree()</a>.</p>
</div>
</div>
<a class="anchor" id="ga978f8d038e8e981bf9e5a104b81c6cb6"></a><!-- doxytag: member="chmempools.h::chPoolFree" ref="ga978f8d038e8e981bf9e5a104b81c6cb6" args="(MemoryPool *mp, void *objp)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void chPoolFree </td>
<td>(</td>
<td class="paramtype"><a class="el" href="struct_memory_pool.html">MemoryPool</a> *&nbsp;</td>
<td class="paramname"> <em>mp</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">void *&nbsp;</td>
<td class="paramname"> <em>objp</em></td><td>&nbsp;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Releases (or adds) an object into (to) a memory pool. </p>
<dl class="note"><dt><b>Note:</b></dt><dd>The object is assumed to be of the right size for the specified memory pool.</dd></dl>
<dl><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>mp</em>&nbsp;</td><td>pointer to a <code><a class="el" href="struct_memory_pool.html" title="Memory pool descriptor.">MemoryPool</a></code> structure </td></tr>
<tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>objp</em>&nbsp;</td><td>the pointer to the object to be released or added </td></tr>
</table>
</dd>
</dl>
<p>Definition at line <a class="el" href="chmempools_8c_source.html#l00132">132</a> of file <a class="el" href="chmempools_8c_source.html">chmempools.c</a>.</p>
<p>References <a class="el" href="group__pools.html#gab5c6c04fd14fbeee2183ca955371c515">chPoolFreeI()</a>, <a class="el" href="group__system.html#ga9f6573c0763d1e4e97c63c62edad6e42">chSysLock</a>, and <a class="el" href="group__system.html#ga5a257fa58a09815eb64a45e2dfbdc22e">chSysUnlock</a>.</p>
<p>Referenced by <a class="el" href="group__threads.html#gaa22f80040cf192015be4607f31a0ac80">chThdRelease()</a>.</p>
<p><div class="dynheader">
Here is the call graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="group__pools_ga978f8d038e8e981bf9e5a104b81c6cb6_cgraph.png" border="0" usemap="#group__pools_ga978f8d038e8e981bf9e5a104b81c6cb6_cgraph" alt=""/></div>
<map name="group__pools_ga978f8d038e8e981bf9e5a104b81c6cb6_cgraph" id="group__pools_ga978f8d038e8e981bf9e5a104b81c6cb6_cgraph">
<area shape="rect" id="node3" href="group__pools.html#gab5c6c04fd14fbeee2183ca955371c515" title="Releases (or adds) an object into (to) a memory pool." alt="" coords="132,5,209,32"/>
</map>
</div>
</p>
</div>
</div>
</div>
<hr size="1"><address style="text-align: right;"><small>
Generated on Sun Oct 24 2010 09:40:46 for ChibiOS/RT by&nbsp;<a href="http://www.doxygen.org/index.html"><img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.7.1</small></address>
</body>
</html>