|
Server : Apache/2.2.17 (Unix) mod_ssl/2.2.17 OpenSSL/0.9.8e-fips-rhel5 DAV/2 PHP/5.2.17 System : Linux localhost 2.6.18-419.el5 #1 SMP Fri Feb 24 22:47:42 UTC 2017 x86_64 User : nobody ( 99) PHP Version : 5.2.17 Disable Function : NONE Directory : /usr/share/devhelp/books/dbus/api/ |
Upload File : |
<!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>D-Bus: Memory allocation implementation details</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.4.7 -->
<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="annotated.html"><span>Data Structures</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>
<h1>Memory allocation implementation details<br>
<small>
[<a class="el" href="group__DBusInternals.html">D-Bus secret internal implementation details</a>]</small>
</h1>internals of <a class="el" href="group__DBusMemory.html#g0fff22bd7f055f5581a9898116a744b1">dbus_malloc()</a> etc.
<a href="#_details">More...</a><table border="0" cellpadding="0" cellspacing="0">
<tr><td></td></tr>
<tr><td colspan="2"><br><h2>Data Structures</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">struct </td><td class="memItemRight" valign="bottom"><a class="el" href="structShutdownClosure.html">ShutdownClosure</a></td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">This struct represents a function to be called on shutdown. <a href="structShutdownClosure.html#_details">More...</a><br></td></tr>
<tr><td colspan="2"><br><h2>Typedefs</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="g719c469fe616ee7148e826e6ebf3c3e4"></a><!-- doxytag: member="DBusMemoryInternals::ShutdownClosure" ref="g719c469fe616ee7148e826e6ebf3c3e4" args="" -->
typedef <a class="el" href="structShutdownClosure.html">ShutdownClosure</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="group__DBusMemoryInternals.html#g719c469fe616ee7148e826e6ebf3c3e4">ShutdownClosure</a></td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Represents a function to be called on shutdown. <br></td></tr>
<tr><td colspan="2"><br><h2>Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="group__DBusTypes.html#g39c9cb0f3a2a8ad6f55cc4855d035349">dbus_bool_t</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="group__DBusMemoryInternals.html#g8dc6d5dd0a0e7901ab793da7403ee734">_dbus_register_shutdown_func</a> (DBusShutdownFunction func, void *data)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Register a cleanup function to be called exactly once the next time <a class="el" href="group__DBusMemory.html#g8b177950791eebaefc7dc1e836c0964c">dbus_shutdown()</a> is called. <a href="#g8dc6d5dd0a0e7901ab793da7403ee734"></a><br></td></tr>
<tr><td colspan="2"><br><h2>Variables</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="group__DBusMemoryInternals.html#g7c224d82013e2bdc181c1d85dcb6f295">_dbus_current_generation</a> = 1</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">_dbus_current_generation is used to track each time that <a class="el" href="group__DBusMemory.html#g8b177950791eebaefc7dc1e836c0964c">dbus_shutdown()</a> is called, so we can reinit things after it's been called. <a href="#g7c224d82013e2bdc181c1d85dcb6f295"></a><br></td></tr>
</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
internals of <a class="el" href="group__DBusMemory.html#g0fff22bd7f055f5581a9898116a744b1">dbus_malloc()</a> etc.
<p>
Implementation details related to allocating and releasing blocks of memory. <hr><h2>Function Documentation</h2>
<a class="anchor" name="g8dc6d5dd0a0e7901ab793da7403ee734"></a><!-- doxytag: member="dbus-memory.c::_dbus_register_shutdown_func" ref="g8dc6d5dd0a0e7901ab793da7403ee734" args="(DBusShutdownFunction func, void *data)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="group__DBusTypes.html#g39c9cb0f3a2a8ad6f55cc4855d035349">dbus_bool_t</a> _dbus_register_shutdown_func </td>
<td>(</td>
<td class="paramtype">DBusShutdownFunction </td>
<td class="paramname"> <em>func</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">void * </td>
<td class="paramname"> <em>data</em></td><td> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td width="100%"></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Register a cleanup function to be called exactly once the next time <a class="el" href="group__DBusMemory.html#g8b177950791eebaefc7dc1e836c0964c">dbus_shutdown()</a> is called.
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>func</em> </td><td>the function </td></tr>
<tr><td valign="top"></td><td valign="top"><em>data</em> </td><td>data to pass to the function </td></tr>
</table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd><a class="el" href="group__DBusMacros.html#ga93f0eb578d23995850d61f7d61c55c1">FALSE</a> on not enough memory </dd></dl>
<p>
Definition at line <a class="el" href="dbus-memory_8c-source.html#l00716">716</a> of file <a class="el" href="dbus-memory_8c-source.html">dbus-memory.c</a>.
<p>
References <a class="el" href="dbus-internals_8h-source.html#l00287">_DBUS_LOCK</a>, <a class="el" href="dbus-internals_8h-source.html#l00288">_DBUS_UNLOCK</a>, <a class="el" href="dbus-memory_8c-source.html#l00701">ShutdownClosure::data</a>, <a class="el" href="dbus-memory_8h-source.html#l00046">dbus_new</a>, <a class="el" href="group__DBusMacros.html#ga93f0eb578d23995850d61f7d61c55c1">FALSE</a>, <a class="el" href="dbus-memory_8c-source.html#l00700">ShutdownClosure::func</a>, <a class="el" href="dbus-memory_8c-source.html#l00699">ShutdownClosure::next</a>, <a class="el" href="group__DBusMacros.html#g070d2ce7b6bb7e5c05602aa8c308d0c4">NULL</a>, and <a class="el" href="group__DBusMacros.html#ga8cecfc5c5c054d2875c03e77b7be15d">TRUE</a>.
</div>
</div><p>
<hr><h2>Variable Documentation</h2>
<a class="anchor" name="g7c224d82013e2bdc181c1d85dcb6f295"></a><!-- doxytag: member="dbus-memory.c::_dbus_current_generation" ref="g7c224d82013e2bdc181c1d85dcb6f295" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int <a class="el" href="group__DBusMemoryInternals.html#g7c224d82013e2bdc181c1d85dcb6f295">_dbus_current_generation</a> = 1 </td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
_dbus_current_generation is used to track each time that <a class="el" href="group__DBusMemory.html#g8b177950791eebaefc7dc1e836c0964c">dbus_shutdown()</a> is called, so we can reinit things after it's been called.
<p>
It is simply incremented each time we shut down.
<p>
Definition at line <a class="el" href="dbus-memory_8c-source.html#l00687">687</a> of file <a class="el" href="dbus-memory_8c-source.html">dbus-memory.c</a>.
<p>
Referenced by <a class="el" href="dbus-threads_8c-source.html#l00232">_dbus_condvar_free_at_location()</a>, <a class="el" href="dbus-threads_8c-source.html#l00200">_dbus_condvar_new_at_location()</a>, <a class="el" href="dbus-connection_8c-source.html#l01801">_dbus_connection_close_possibly_shared()</a>, <a class="el" href="dbus-connection_8c-source.html#l01163">_dbus_connection_new_for_transport()</a>, <a class="el" href="dbus-connection_8c-source.html#l01326">_dbus_connection_ref_unlocked()</a>, <a class="el" href="dbus-internals_8c-source.html#l00715">_dbus_get_local_machine_uuid_encoded()</a>, <a class="el" href="dbus-threads_8c-source.html#l00126">_dbus_mutex_free_at_location()</a>, <a class="el" href="dbus-threads_8c-source.html#l00088">_dbus_mutex_new_at_location()</a>, <a class="el" href="dbus-connection_8c-source.html#l02741">dbus_connection_close()</a>, <a class="el" href="dbus-connection_8c-source.html#l02464">dbus_connection_ref()</a>, <a class="el" href="dbus-connection_8c-source.html#l02610">dbus_connection_unref()</a>, <a class="el" href="dbus-message_8c-source.html#l01365">dbus_message_ref()</a>, <a class="el" href="dbus-message_8c-source.html#l01387">dbus_message_unref()</a>, and <a class="el" href="dbus-threads_8c-source.html#l00545">dbus_threads_init()</a>.
</div>
</div><p>
<hr size="1"><address style="align: right;"><small>Generated on Mon Dec 14 22:26:14 2009 for D-Bus by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.7 </small></address>
</body>
</html>