docs/api-2.1/mempool_8h_source.html

Sun, 14 Feb 2021 11:30:47 +0100

author
Mike Becker <universe@uap-core.de>
date
Sun, 14 Feb 2021 11:30:47 +0100
changeset 410
76b76f0f046b
parent 390
d345541018fa
permissions
-rw-r--r--

add test config and let the test binary return nonzero on test failures

390
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
2 <html xmlns="http://www.w3.org/1999/xhtml">
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
3 <head>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
4 <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
5 <meta http-equiv="X-UA-Compatible" content="IE=9"/>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
6 <meta name="generator" content="Doxygen 1.8.13"/>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
7 <meta name="viewport" content="width=device-width, initial-scale=1"/>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
8 <title>ucx: /home/mike/workspace/c/ucx/src/ucx/mempool.h Source File</title>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
9 <link href="tabs.css" rel="stylesheet" type="text/css"/>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
10 <script type="text/javascript" src="jquery.js"></script>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
11 <script type="text/javascript" src="dynsections.js"></script>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
12 <link href="search/search.css" rel="stylesheet" type="text/css"/>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
13 <script type="text/javascript" src="search/searchdata.js"></script>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
14 <script type="text/javascript" src="search/search.js"></script>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
15 <link href="doxygen.css" rel="stylesheet" type="text/css" />
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
16 </head>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
17 <body>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
18 <div id="top"><!-- do not remove this div, it is closed by doxygen! -->
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
19 <div id="titlearea">
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
20 <table cellspacing="0" cellpadding="0">
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
21 <tbody>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
22 <tr style="height: 56px;">
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
23 <td id="projectlogo"><img alt="Logo" src="uaplogo.png"/></td>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
24 <td id="projectalign" style="padding-left: 0.5em;">
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
25 <div id="projectname">ucx
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
26 </div>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
27 <div id="projectbrief">UAP Common Extensions</div>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
28 </td>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
29 </tr>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
30 </tbody>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
31 </table>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
32 </div>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
33 <!-- end header part -->
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
34 <!-- Generated by Doxygen 1.8.13 -->
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
35 <script type="text/javascript">
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
36 var searchBox = new SearchBox("searchBox", "search",false,'Search');
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
37 </script>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
38 <script type="text/javascript" src="menudata.js"></script>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
39 <script type="text/javascript" src="menu.js"></script>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
40 <script type="text/javascript">
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
41 $(function() {
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
42 initMenu('',true,false,'search.php','Search');
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
43 $(document).ready(function() { init_search(); });
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
44 });
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
45 </script>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
46 <div id="main-nav"></div>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
47 <!-- window showing the filter options -->
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
48 <div id="MSearchSelectWindow"
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
49 onmouseover="return searchBox.OnSearchSelectShow()"
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
50 onmouseout="return searchBox.OnSearchSelectHide()"
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
51 onkeydown="return searchBox.OnSearchSelectKey(event)">
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
52 </div>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
53
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
54 <!-- iframe showing the search results (closed by default) -->
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
55 <div id="MSearchResultsWindow">
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
56 <iframe src="javascript:void(0)" frameborder="0"
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
57 name="MSearchResults" id="MSearchResults">
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
58 </iframe>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
59 </div>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
60
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
61 <div id="nav-path" class="navpath">
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
62 <ul>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
63 <li class="navelem"><a class="el" href="dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li><li class="navelem"><a class="el" href="dir_69f4ea29401808fe6229564976cde3ce.html">ucx</a></li> </ul>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
64 </div>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
65 </div><!-- top -->
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
66 <div class="header">
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
67 <div class="headertitle">
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
68 <div class="title">mempool.h</div> </div>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
69 </div><!--header-->
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
70 <div class="contents">
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
71 <a href="mempool_8h.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span>&#160;<span class="comment">/*</span></div><div class="line"><a name="l00002"></a><span class="lineno"> 2</span>&#160;<span class="comment"> * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.</span></div><div class="line"><a name="l00003"></a><span class="lineno"> 3</span>&#160;<span class="comment"> *</span></div><div class="line"><a name="l00004"></a><span class="lineno"> 4</span>&#160;<span class="comment"> * Copyright 2017 Mike Becker, Olaf Wintermann All rights reserved.</span></div><div class="line"><a name="l00005"></a><span class="lineno"> 5</span>&#160;<span class="comment"> *</span></div><div class="line"><a name="l00006"></a><span class="lineno"> 6</span>&#160;<span class="comment"> * Redistribution and use in source and binary forms, with or without</span></div><div class="line"><a name="l00007"></a><span class="lineno"> 7</span>&#160;<span class="comment"> * modification, are permitted provided that the following conditions are met:</span></div><div class="line"><a name="l00008"></a><span class="lineno"> 8</span>&#160;<span class="comment"> *</span></div><div class="line"><a name="l00009"></a><span class="lineno"> 9</span>&#160;<span class="comment"> * 1. Redistributions of source code must retain the above copyright</span></div><div class="line"><a name="l00010"></a><span class="lineno"> 10</span>&#160;<span class="comment"> * notice, this list of conditions and the following disclaimer.</span></div><div class="line"><a name="l00011"></a><span class="lineno"> 11</span>&#160;<span class="comment"> *</span></div><div class="line"><a name="l00012"></a><span class="lineno"> 12</span>&#160;<span class="comment"> * 2. Redistributions in binary form must reproduce the above copyright</span></div><div class="line"><a name="l00013"></a><span class="lineno"> 13</span>&#160;<span class="comment"> * notice, this list of conditions and the following disclaimer in the</span></div><div class="line"><a name="l00014"></a><span class="lineno"> 14</span>&#160;<span class="comment"> * documentation and/or other materials provided with the distribution.</span></div><div class="line"><a name="l00015"></a><span class="lineno"> 15</span>&#160;<span class="comment"> *</span></div><div class="line"><a name="l00016"></a><span class="lineno"> 16</span>&#160;<span class="comment"> * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS &quot;AS IS&quot;</span></div><div class="line"><a name="l00017"></a><span class="lineno"> 17</span>&#160;<span class="comment"> * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE</span></div><div class="line"><a name="l00018"></a><span class="lineno"> 18</span>&#160;<span class="comment"> * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE</span></div><div class="line"><a name="l00019"></a><span class="lineno"> 19</span>&#160;<span class="comment"> * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE</span></div><div class="line"><a name="l00020"></a><span class="lineno"> 20</span>&#160;<span class="comment"> * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR</span></div><div class="line"><a name="l00021"></a><span class="lineno"> 21</span>&#160;<span class="comment"> * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF</span></div><div class="line"><a name="l00022"></a><span class="lineno"> 22</span>&#160;<span class="comment"> * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS</span></div><div class="line"><a name="l00023"></a><span class="lineno"> 23</span>&#160;<span class="comment"> * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN</span></div><div class="line"><a name="l00024"></a><span class="lineno"> 24</span>&#160;<span class="comment"> * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)</span></div><div class="line"><a name="l00025"></a><span class="lineno"> 25</span>&#160;<span class="comment"> * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE</span></div><div class="line"><a name="l00026"></a><span class="lineno"> 26</span>&#160;<span class="comment"> * POSSIBILITY OF SUCH DAMAGE.</span></div><div class="line"><a name="l00027"></a><span class="lineno"> 27</span>&#160;<span class="comment"> */</span></div><div class="line"><a name="l00028"></a><span class="lineno"> 28</span>&#160;</div><div class="line"><a name="l00038"></a><span class="lineno"> 38</span>&#160;<span class="preprocessor">#ifndef UCX_MEMPOOL_H</span></div><div class="line"><a name="l00039"></a><span class="lineno"> 39</span>&#160;<span class="preprocessor">#define UCX_MEMPOOL_H</span></div><div class="line"><a name="l00040"></a><span class="lineno"> 40</span>&#160;</div><div class="line"><a name="l00041"></a><span class="lineno"> 41</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="ucx_8h.html">ucx.h</a>&quot;</span></div><div class="line"><a name="l00042"></a><span class="lineno"> 42</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="allocator_8h.html">allocator.h</a>&quot;</span></div><div class="line"><a name="l00043"></a><span class="lineno"> 43</span>&#160;<span class="preprocessor">#include &lt;stddef.h&gt;</span></div><div class="line"><a name="l00044"></a><span class="lineno"> 44</span>&#160;</div><div class="line"><a name="l00045"></a><span class="lineno"> 45</span>&#160;<span class="preprocessor">#ifdef __cplusplus</span></div><div class="line"><a name="l00046"></a><span class="lineno"> 46</span>&#160;<span class="keyword">extern</span> <span class="stringliteral">&quot;C&quot;</span> {</div><div class="line"><a name="l00047"></a><span class="lineno"> 47</span>&#160;<span class="preprocessor">#endif</span></div><div class="line"><a name="l00048"></a><span class="lineno"> 48</span>&#160;</div><div class="line"><a name="l00052"></a><span class="lineno"><a class="line" href="structUcxMempool.html"> 52</a></span>&#160;<span class="keyword">typedef</span> <span class="keyword">struct </span>{</div><div class="line"><a name="l00054"></a><span class="lineno"><a class="line" href="structUcxMempool.html#ac45fd1e9269399e4c434d6bdaa770d92"> 54</a></span>&#160; <a class="code" href="structUcxAllocator.html">UcxAllocator</a> *<a class="code" href="structUcxMempool.html#ac45fd1e9269399e4c434d6bdaa770d92">allocator</a>;</div><div class="line"><a name="l00055"></a><span class="lineno"> 55</span>&#160; </div><div class="line"><a name="l00057"></a><span class="lineno"><a class="line" href="structUcxMempool.html#ae98c1b0150bb119ee0a8506a6f310d6e"> 57</a></span>&#160; <span class="keywordtype">void</span> **<a class="code" href="structUcxMempool.html#ae98c1b0150bb119ee0a8506a6f310d6e">data</a>;</div><div class="line"><a name="l00058"></a><span class="lineno"> 58</span>&#160; </div><div class="line"><a name="l00060"></a><span class="lineno"><a class="line" href="structUcxMempool.html#aa3a73ab231e1bc207d526f46f1c1e23a"> 60</a></span>&#160; <span class="keywordtype">size_t</span> <a class="code" href="structUcxMempool.html#aa3a73ab231e1bc207d526f46f1c1e23a">ndata</a>;</div><div class="line"><a name="l00061"></a><span class="lineno"> 61</span>&#160; </div><div class="line"><a name="l00063"></a><span class="lineno"><a class="line" href="structUcxMempool.html#a304729986f2894971d0469e71e196bf0"> 63</a></span>&#160; <span class="keywordtype">size_t</span> <a class="code" href="structUcxMempool.html#a304729986f2894971d0469e71e196bf0">size</a>;</div><div class="line"><a name="l00064"></a><span class="lineno"> 64</span>&#160;} <a class="code" href="structUcxMempool.html">UcxMempool</a>;</div><div class="line"><a name="l00065"></a><span class="lineno"> 65</span>&#160;</div><div class="line"><a name="l00067"></a><span class="lineno"><a class="line" href="mempool_8h.html#a49f7bd1da5ac201d0cf54dc0f0d82dd2"> 67</a></span>&#160;<span class="preprocessor">#define ucx_mempool_new_default() ucx_mempool_new(16)</span></div><div class="line"><a name="l00068"></a><span class="lineno"> 68</span>&#160;</div><div class="line"><a name="l00069"></a><span class="lineno"> 69</span>&#160;</div><div class="line"><a name="l00081"></a><span class="lineno"> 81</span>&#160;<a class="code" href="structUcxMempool.html">UcxMempool</a> *<a class="code" href="mempool_8h.html#ad71cb8c3b6fdb30360376a8b372ef22a">ucx_mempool_new</a>(<span class="keywordtype">size_t</span> n);</div><div class="line"><a name="l00082"></a><span class="lineno"> 82</span>&#160;</div><div class="line"><a name="l00093"></a><span class="lineno"> 93</span>&#160;<span class="keywordtype">int</span> <a class="code" href="mempool_8h.html#aaf75b5016098723a9280531ccc3a6d77">ucx_mempool_chcap</a>(<a class="code" href="structUcxMempool.html">UcxMempool</a> *pool, <span class="keywordtype">size_t</span> newcap);</div><div class="line"><a name="l00094"></a><span class="lineno"> 94</span>&#160;</div><div class="line"><a name="l00103"></a><span class="lineno"> 103</span>&#160;<span class="keywordtype">void</span> *<a class="code" href="mempool_8h.html#a2ae492b8f2878ccc9837ac213dced11e">ucx_mempool_malloc</a>(<a class="code" href="structUcxMempool.html">UcxMempool</a> *pool, <span class="keywordtype">size_t</span> n);</div><div class="line"><a name="l00115"></a><span class="lineno"> 115</span>&#160;<span class="keywordtype">void</span> *<a class="code" href="mempool_8h.html#a4b9142011824ae24f00fabe128417d69">ucx_mempool_calloc</a>(<a class="code" href="structUcxMempool.html">UcxMempool</a> *pool, <span class="keywordtype">size_t</span> nelem, <span class="keywordtype">size_t</span> elsize);</div><div class="line"><a name="l00116"></a><span class="lineno"> 116</span>&#160;</div><div class="line"><a name="l00129"></a><span class="lineno"> 129</span>&#160;<span class="keywordtype">void</span> *<a class="code" href="mempool_8h.html#a660ef42520ed6737c2e77aae18e3a7a4">ucx_mempool_realloc</a>(<a class="code" href="structUcxMempool.html">UcxMempool</a> *pool, <span class="keywordtype">void</span> *ptr, <span class="keywordtype">size_t</span> n);</div><div class="line"><a name="l00130"></a><span class="lineno"> 130</span>&#160;</div><div class="line"><a name="l00144"></a><span class="lineno"> 144</span>&#160;<span class="keywordtype">void</span> <a class="code" href="mempool_8h.html#aefa26e3015f5aefadbfc74221bd246ac">ucx_mempool_free</a>(<a class="code" href="structUcxMempool.html">UcxMempool</a> *pool, <span class="keywordtype">void</span> *ptr);</div><div class="line"><a name="l00145"></a><span class="lineno"> 145</span>&#160;</div><div class="line"><a name="l00160"></a><span class="lineno"> 160</span>&#160;<span class="keywordtype">void</span> <a class="code" href="mempool_8h.html#af096378da7e9bfbed3088497cf4c15bf">ucx_mempool_destroy</a>(<a class="code" href="structUcxMempool.html">UcxMempool</a> *pool);</div><div class="line"><a name="l00161"></a><span class="lineno"> 161</span>&#160;</div><div class="line"><a name="l00181"></a><span class="lineno"> 181</span>&#160;<span class="keywordtype">void</span> <a class="code" href="mempool_8h.html#adb788e7ec24cd7dbdea6381539c549f2">ucx_mempool_set_destr</a>(<span class="keywordtype">void</span> *ptr, <a class="code" href="ucx_8h.html#ad2b370c2809914c8b7fedab163c266b3">ucx_destructor</a> func);</div><div class="line"><a name="l00182"></a><span class="lineno"> 182</span>&#160;</div><div class="line"><a name="l00202"></a><span class="lineno"> 202</span>&#160;<span class="keywordtype">void</span> <a class="code" href="mempool_8h.html#af47b6b7c40f8f263dc28cc9a4e77b27c">ucx_mempool_reg_destr</a>(<a class="code" href="structUcxMempool.html">UcxMempool</a> *pool, <span class="keywordtype">void</span> *ptr, <a class="code" href="ucx_8h.html#ad2b370c2809914c8b7fedab163c266b3">ucx_destructor</a> destr);</div><div class="line"><a name="l00203"></a><span class="lineno"> 203</span>&#160;</div><div class="line"><a name="l00204"></a><span class="lineno"> 204</span>&#160;<span class="preprocessor">#ifdef __cplusplus</span></div><div class="line"><a name="l00205"></a><span class="lineno"> 205</span>&#160;}</div><div class="line"><a name="l00206"></a><span class="lineno"> 206</span>&#160;<span class="preprocessor">#endif</span></div><div class="line"><a name="l00207"></a><span class="lineno"> 207</span>&#160;</div><div class="line"><a name="l00208"></a><span class="lineno"> 208</span>&#160;<span class="preprocessor">#endif </span><span class="comment">/* UCX_MEMPOOL_H */</span><span class="preprocessor"></span></div><div class="line"><a name="l00209"></a><span class="lineno"> 209</span>&#160;</div><div class="ttc" id="mempool_8h_html_aefa26e3015f5aefadbfc74221bd246ac"><div class="ttname"><a href="mempool_8h.html#aefa26e3015f5aefadbfc74221bd246ac">ucx_mempool_free</a></div><div class="ttdeci">void ucx_mempool_free(UcxMempool *pool, void *ptr)</div><div class="ttdoc">Frees pooled memory. </div><div class="ttdef"><b>Definition:</b> mempool.c:187</div></div>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
72 <div class="ttc" id="structUcxMempool_html"><div class="ttname"><a href="structUcxMempool.html">UcxMempool</a></div><div class="ttdoc">UCX mempool structure. </div><div class="ttdef"><b>Definition:</b> mempool.h:52</div></div>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
73 <div class="ttc" id="mempool_8h_html_af096378da7e9bfbed3088497cf4c15bf"><div class="ttname"><a href="mempool_8h.html#af096378da7e9bfbed3088497cf4c15bf">ucx_mempool_destroy</a></div><div class="ttdeci">void ucx_mempool_destroy(UcxMempool *pool)</div><div class="ttdoc">Destroys a memory pool. </div><div class="ttdef"><b>Definition:</b> mempool.c:209</div></div>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
74 <div class="ttc" id="ucx_8h_html"><div class="ttname"><a href="ucx_8h.html">ucx.h</a></div><div class="ttdoc">Main UCX Header providing most common definitions. </div></div>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
75 <div class="ttc" id="mempool_8h_html_aaf75b5016098723a9280531ccc3a6d77"><div class="ttname"><a href="mempool_8h.html#aaf75b5016098723a9280531ccc3a6d77">ucx_mempool_chcap</a></div><div class="ttdeci">int ucx_mempool_chcap(UcxMempool *pool, size_t newcap)</div><div class="ttdoc">Resizes a memory pool. </div><div class="ttdef"><b>Definition:</b> mempool.c:103</div></div>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
76 <div class="ttc" id="mempool_8h_html_af47b6b7c40f8f263dc28cc9a4e77b27c"><div class="ttname"><a href="mempool_8h.html#af47b6b7c40f8f263dc28cc9a4e77b27c">ucx_mempool_reg_destr</a></div><div class="ttdeci">void ucx_mempool_reg_destr(UcxMempool *pool, void *ptr, ucx_destructor destr)</div><div class="ttdoc">Registers a destructor function for the specified (non-pooled) memory. </div><div class="ttdef"><b>Definition:</b> mempool.c:229</div></div>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
77 <div class="ttc" id="mempool_8h_html_a2ae492b8f2878ccc9837ac213dced11e"><div class="ttname"><a href="mempool_8h.html#a2ae492b8f2878ccc9837ac213dced11e">ucx_mempool_malloc</a></div><div class="ttdeci">void * ucx_mempool_malloc(UcxMempool *pool, size_t n)</div><div class="ttdoc">Allocates pooled memory. </div><div class="ttdef"><b>Definition:</b> mempool.c:123</div></div>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
78 <div class="ttc" id="structUcxMempool_html_a304729986f2894971d0469e71e196bf0"><div class="ttname"><a href="structUcxMempool.html#a304729986f2894971d0469e71e196bf0">UcxMempool::size</a></div><div class="ttdeci">size_t size</div><div class="ttdoc">Memory pool size. </div><div class="ttdef"><b>Definition:</b> mempool.h:63</div></div>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
79 <div class="ttc" id="structUcxMempool_html_aa3a73ab231e1bc207d526f46f1c1e23a"><div class="ttname"><a href="structUcxMempool.html#aa3a73ab231e1bc207d526f46f1c1e23a">UcxMempool::ndata</a></div><div class="ttdeci">size_t ndata</div><div class="ttdoc">Count of pooled memory items. </div><div class="ttdef"><b>Definition:</b> mempool.h:60</div></div>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
80 <div class="ttc" id="structUcxAllocator_html"><div class="ttname"><a href="structUcxAllocator.html">UcxAllocator</a></div><div class="ttdoc">UCX allocator data structure containing memory management functions. </div><div class="ttdef"><b>Definition:</b> allocator.h:88</div></div>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
81 <div class="ttc" id="mempool_8h_html_a4b9142011824ae24f00fabe128417d69"><div class="ttname"><a href="mempool_8h.html#a4b9142011824ae24f00fabe128417d69">ucx_mempool_calloc</a></div><div class="ttdeci">void * ucx_mempool_calloc(UcxMempool *pool, size_t nelem, size_t elsize)</div><div class="ttdoc">Allocates a pooled memory array. </div><div class="ttdef"><b>Definition:</b> mempool.c:148</div></div>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
82 <div class="ttc" id="structUcxMempool_html_ae98c1b0150bb119ee0a8506a6f310d6e"><div class="ttname"><a href="structUcxMempool.html#ae98c1b0150bb119ee0a8506a6f310d6e">UcxMempool::data</a></div><div class="ttdeci">void ** data</div><div class="ttdoc">List of pointers to pooled memory. </div><div class="ttdef"><b>Definition:</b> mempool.h:57</div></div>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
83 <div class="ttc" id="mempool_8h_html_ad71cb8c3b6fdb30360376a8b372ef22a"><div class="ttname"><a href="mempool_8h.html#ad71cb8c3b6fdb30360376a8b372ef22a">ucx_mempool_new</a></div><div class="ttdeci">UcxMempool * ucx_mempool_new(size_t n)</div><div class="ttdoc">Creates a memory pool with the specified initial size. </div><div class="ttdef"><b>Definition:</b> mempool.c:67</div></div>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
84 <div class="ttc" id="mempool_8h_html_a660ef42520ed6737c2e77aae18e3a7a4"><div class="ttname"><a href="mempool_8h.html#a660ef42520ed6737c2e77aae18e3a7a4">ucx_mempool_realloc</a></div><div class="ttdeci">void * ucx_mempool_realloc(UcxMempool *pool, void *ptr, size_t n)</div><div class="ttdoc">Reallocates pooled memory. </div><div class="ttdef"><b>Definition:</b> mempool.c:162</div></div>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
85 <div class="ttc" id="allocator_8h_html"><div class="ttname"><a href="allocator_8h.html">allocator.h</a></div><div class="ttdoc">Allocator for custom memory management. </div></div>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
86 <div class="ttc" id="structUcxMempool_html_ac45fd1e9269399e4c434d6bdaa770d92"><div class="ttname"><a href="structUcxMempool.html#ac45fd1e9269399e4c434d6bdaa770d92">UcxMempool::allocator</a></div><div class="ttdeci">UcxAllocator * allocator</div><div class="ttdoc">UcxAllocator based on this pool. </div><div class="ttdef"><b>Definition:</b> mempool.h:54</div></div>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
87 <div class="ttc" id="mempool_8h_html_adb788e7ec24cd7dbdea6381539c549f2"><div class="ttname"><a href="mempool_8h.html#adb788e7ec24cd7dbdea6381539c549f2">ucx_mempool_set_destr</a></div><div class="ttdeci">void ucx_mempool_set_destr(void *ptr, ucx_destructor func)</div><div class="ttdoc">Sets a destructor function for the specified memory. </div><div class="ttdef"><b>Definition:</b> mempool.c:225</div></div>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
88 <div class="ttc" id="ucx_8h_html_ad2b370c2809914c8b7fedab163c266b3"><div class="ttname"><a href="ucx_8h.html#ad2b370c2809914c8b7fedab163c266b3">ucx_destructor</a></div><div class="ttdeci">void(* ucx_destructor)(void *)</div><div class="ttdoc">A function pointer to a destructor function. </div><div class="ttdef"><b>Definition:</b> ucx.h:72</div></div>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
89 </div><!-- fragment --></div><!-- contents -->
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
90 <!-- start footer part -->
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
91 <hr class="footer"/><address class="footer"><small>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
92 Generated on Thu Dec 19 2019 19:58:24 for ucx by &#160;<a href="http://www.doxygen.org/index.html">
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
93 <img class="footer" src="doxygen.png" alt="doxygen"/>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
94 </a> 1.8.13
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
95 </small></address>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
96 </body>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
97 </html>

mercurial