docs/api-2.1/allocator_8h_source.html

Thu, 26 Dec 2024 18:32:05 +0100

author
Mike Becker <universe@uap-core.de>
date
Thu, 26 Dec 2024 18:32:05 +0100
changeset 1055
221e2e2f2c06
parent 390
d345541018fa
permissions
-rw-r--r--

fix cxJsonObjPut() for existing keys

issue #532

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/allocator.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">allocator.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="allocator_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="l00052"></a><span class="lineno"> 52</span>&#160;<span class="preprocessor">#ifndef UCX_ALLOCATOR_H</span></div><div class="line"><a name="l00053"></a><span class="lineno"> 53</span>&#160;<span class="preprocessor">#define UCX_ALLOCATOR_H</span></div><div class="line"><a name="l00054"></a><span class="lineno"> 54</span>&#160;</div><div class="line"><a name="l00055"></a><span class="lineno"> 55</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="l00056"></a><span class="lineno"> 56</span>&#160;</div><div class="line"><a name="l00057"></a><span class="lineno"> 57</span>&#160;<span class="preprocessor">#ifdef __cplusplus</span></div><div class="line"><a name="l00058"></a><span class="lineno"> 58</span>&#160;<span class="keyword">extern</span> <span class="stringliteral">&quot;C&quot;</span> {</div><div class="line"><a name="l00059"></a><span class="lineno"> 59</span>&#160;<span class="preprocessor">#endif</span></div><div class="line"><a name="l00060"></a><span class="lineno"> 60</span>&#160;</div><div class="line"><a name="l00065"></a><span class="lineno"><a class="line" href="allocator_8h.html#a29f0f6a23a70db3b60635cd6dc384473"> 65</a></span>&#160;<span class="keyword">typedef</span> <span class="keywordtype">void</span>*(*ucx_allocator_malloc)(<span class="keywordtype">void</span> *pool, <span class="keywordtype">size_t</span> n);</div><div class="line"><a name="l00066"></a><span class="lineno"> 66</span>&#160;</div><div class="line"><a name="l00071"></a><span class="lineno"><a class="line" href="allocator_8h.html#a2c0aba4221c1ac6801f03ed799f15b12"> 71</a></span>&#160;<span class="keyword">typedef</span> <span class="keywordtype">void</span>*(*ucx_allocator_calloc)(<span class="keywordtype">void</span> *pool, <span class="keywordtype">size_t</span> n, <span class="keywordtype">size_t</span> size);</div><div class="line"><a name="l00072"></a><span class="lineno"> 72</span>&#160;</div><div class="line"><a name="l00077"></a><span class="lineno"><a class="line" href="allocator_8h.html#a6d7cf038a806e327c5da37321d04e426"> 77</a></span>&#160;<span class="keyword">typedef</span> <span class="keywordtype">void</span>*(*ucx_allocator_realloc)(<span class="keywordtype">void</span> *pool, <span class="keywordtype">void</span> *data, <span class="keywordtype">size_t</span> n);</div><div class="line"><a name="l00078"></a><span class="lineno"> 78</span>&#160;</div><div class="line"><a name="l00083"></a><span class="lineno"><a class="line" href="allocator_8h.html#aaf2387ddaddd8ab4b267e6b00e5d6f7e"> 83</a></span>&#160;<span class="keyword">typedef</span> void(*<a class="code" href="allocator_8h.html#aaf2387ddaddd8ab4b267e6b00e5d6f7e">ucx_allocator_free</a>)(<span class="keywordtype">void</span> *pool, <span class="keywordtype">void</span> *data);</div><div class="line"><a name="l00084"></a><span class="lineno"> 84</span>&#160;</div><div class="line"><a name="l00088"></a><span class="lineno"><a class="line" href="structUcxAllocator.html"> 88</a></span>&#160;<span class="keyword">typedef</span> <span class="keyword">struct </span>{</div><div class="line"><a name="l00093"></a><span class="lineno"><a class="line" href="structUcxAllocator.html#a1b78012998d1c28be86dc595f8f0aac9"> 93</a></span>&#160; <span class="keywordtype">void</span> *<a class="code" href="structUcxAllocator.html#a1b78012998d1c28be86dc595f8f0aac9">pool</a>;</div><div class="line"><a name="l00097"></a><span class="lineno"><a class="line" href="structUcxAllocator.html#a013376172be39ed54f77c4be6898845a"> 97</a></span>&#160; <a class="code" href="allocator_8h.html#a29f0f6a23a70db3b60635cd6dc384473">ucx_allocator_malloc</a> <a class="code" href="structUcxAllocator.html#a013376172be39ed54f77c4be6898845a">malloc</a>;</div><div class="line"><a name="l00101"></a><span class="lineno"><a class="line" href="structUcxAllocator.html#ab94ec1cba45cc4e7d81e1588a11cbb62"> 101</a></span>&#160; <a class="code" href="allocator_8h.html#a2c0aba4221c1ac6801f03ed799f15b12">ucx_allocator_calloc</a> <a class="code" href="structUcxAllocator.html#ab94ec1cba45cc4e7d81e1588a11cbb62">calloc</a>;</div><div class="line"><a name="l00105"></a><span class="lineno"><a class="line" href="structUcxAllocator.html#a3550e3847f31d9e9ce3ffcb0d3440c15"> 105</a></span>&#160; <a class="code" href="allocator_8h.html#a6d7cf038a806e327c5da37321d04e426">ucx_allocator_realloc</a> <a class="code" href="structUcxAllocator.html#a3550e3847f31d9e9ce3ffcb0d3440c15">realloc</a>;</div><div class="line"><a name="l00109"></a><span class="lineno"><a class="line" href="structUcxAllocator.html#aecce1840378ed53f1002190f4f87026f"> 109</a></span>&#160; <a class="code" href="allocator_8h.html#aaf2387ddaddd8ab4b267e6b00e5d6f7e">ucx_allocator_free</a> <a class="code" href="structUcxAllocator.html#aecce1840378ed53f1002190f4f87026f">free</a>;</div><div class="line"><a name="l00110"></a><span class="lineno"> 110</span>&#160;} <a class="code" href="structUcxAllocator.html">UcxAllocator</a>;</div><div class="line"><a name="l00111"></a><span class="lineno"> 111</span>&#160;</div><div class="line"><a name="l00127"></a><span class="lineno"> 127</span>&#160;<a class="code" href="structUcxAllocator.html">UcxAllocator</a> *<a class="code" href="allocator_8h.html#a98d2f1b341118b7a0e341fda5d8b2ebf">ucx_default_allocator</a>();</div><div class="line"><a name="l00128"></a><span class="lineno"> 128</span>&#160;</div><div class="line"><a name="l00135"></a><span class="lineno"> 135</span>&#160;<span class="keywordtype">void</span> *<a class="code" href="allocator_8h.html#a96403ebf3d2312d95f2fe7627a1cdbc0">ucx_default_malloc</a>(<span class="keywordtype">void</span> *ignore, <span class="keywordtype">size_t</span> n);</div><div class="line"><a name="l00143"></a><span class="lineno"> 143</span>&#160;<span class="keywordtype">void</span> *<a class="code" href="allocator_8h.html#a3a0bfdd13d887012309c459b339f338f">ucx_default_calloc</a>(<span class="keywordtype">void</span> *ignore, <span class="keywordtype">size_t</span> n, <span class="keywordtype">size_t</span> size);</div><div class="line"><a name="l00151"></a><span class="lineno"> 151</span>&#160;<span class="keywordtype">void</span> *<a class="code" href="allocator_8h.html#a47cfc8af626a86fcb93a2b14b90498ed">ucx_default_realloc</a>(<span class="keywordtype">void</span> *ignore, <span class="keywordtype">void</span> *data, <span class="keywordtype">size_t</span> n);</div><div class="line"><a name="l00157"></a><span class="lineno"> 157</span>&#160;<span class="keywordtype">void</span> <a class="code" href="allocator_8h.html#a646d83aaaadfe33ae414c0fad8bfc52a">ucx_default_free</a>(<span class="keywordtype">void</span> *ignore, <span class="keywordtype">void</span> *data);</div><div class="line"><a name="l00158"></a><span class="lineno"> 158</span>&#160;</div><div class="line"><a name="l00165"></a><span class="lineno"><a class="line" href="allocator_8h.html#ae1bc218fea8a35f4a3706f0beefcfb19"> 165</a></span>&#160;<span class="preprocessor">#define almalloc(allocator, n) ((allocator)-&gt;malloc((allocator)-&gt;pool, n))</span></div><div class="line"><a name="l00166"></a><span class="lineno"> 166</span>&#160;</div><div class="line"><a name="l00174"></a><span class="lineno"><a class="line" href="allocator_8h.html#a8d71470816f88f78cb9a9686c57e1b10"> 174</a></span>&#160;<span class="preprocessor">#define alcalloc(allocator, n, size) \</span></div><div class="line"><a name="l00175"></a><span class="lineno"> 175</span>&#160;<span class="preprocessor"> ((allocator)-&gt;calloc((allocator)-&gt;pool, n, size))</span></div><div class="line"><a name="l00176"></a><span class="lineno"> 176</span>&#160;</div><div class="line"><a name="l00184"></a><span class="lineno"><a class="line" href="allocator_8h.html#a029ee5c9bcbb3f873571553f788c5820"> 184</a></span>&#160;<span class="preprocessor">#define alrealloc(allocator, ptr, n) \</span></div><div class="line"><a name="l00185"></a><span class="lineno"> 185</span>&#160;<span class="preprocessor"> ((allocator)-&gt;realloc((allocator)-&gt;pool, ptr, n))</span></div><div class="line"><a name="l00186"></a><span class="lineno"> 186</span>&#160;</div><div class="line"><a name="l00192"></a><span class="lineno"><a class="line" href="allocator_8h.html#acd775785b54e97dc2b33a432c12c8fb2"> 192</a></span>&#160;<span class="preprocessor">#define alfree(allocator, ptr) ((allocator)-&gt;free((allocator)-&gt;pool, ptr))</span></div><div class="line"><a name="l00193"></a><span class="lineno"> 193</span>&#160;</div><div class="line"><a name="l00197"></a><span class="lineno"><a class="line" href="allocator_8h.html#a1283a8f875f90a7af3aba5e031fc2e3f"> 197</a></span>&#160;<span class="preprocessor">#define UCX_ALLOCATOR_DEFAULT {NULL, \</span></div><div class="line"><a name="l00198"></a><span class="lineno"> 198</span>&#160;<span class="preprocessor"> ucx_default_malloc, ucx_default_calloc, ucx_default_realloc, \</span></div><div class="line"><a name="l00199"></a><span class="lineno"> 199</span>&#160;<span class="preprocessor"> ucx_default_free }</span></div><div class="line"><a name="l00200"></a><span class="lineno"> 200</span>&#160;</div><div class="line"><a name="l00201"></a><span class="lineno"> 201</span>&#160;<span class="preprocessor">#ifdef __cplusplus</span></div><div class="line"><a name="l00202"></a><span class="lineno"> 202</span>&#160;}</div><div class="line"><a name="l00203"></a><span class="lineno"> 203</span>&#160;<span class="preprocessor">#endif</span></div><div class="line"><a name="l00204"></a><span class="lineno"> 204</span>&#160;</div><div class="line"><a name="l00205"></a><span class="lineno"> 205</span>&#160;<span class="preprocessor">#endif </span><span class="comment">/* UCX_ALLOCATOR_H */</span><span class="preprocessor"></span></div><div class="line"><a name="l00206"></a><span class="lineno"> 206</span>&#160;</div><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
72 <div class="ttc" id="allocator_8h_html_a96403ebf3d2312d95f2fe7627a1cdbc0"><div class="ttname"><a href="allocator_8h.html#a96403ebf3d2312d95f2fe7627a1cdbc0">ucx_default_malloc</a></div><div class="ttdeci">void * ucx_default_malloc(void *ignore, size_t n)</div><div class="ttdoc">A wrapper for the standard libc malloc() function. </div><div class="ttdef"><b>Definition:</b> allocator.c:46</div></div>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
73 <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
74 <div class="ttc" id="structUcxAllocator_html_a013376172be39ed54f77c4be6898845a"><div class="ttname"><a href="structUcxAllocator.html#a013376172be39ed54f77c4be6898845a">UcxAllocator::malloc</a></div><div class="ttdeci">ucx_allocator_malloc malloc</div><div class="ttdoc">The malloc() function for this allocator. </div><div class="ttdef"><b>Definition:</b> allocator.h:97</div></div>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
75 <div class="ttc" id="allocator_8h_html_a2c0aba4221c1ac6801f03ed799f15b12"><div class="ttname"><a href="allocator_8h.html#a2c0aba4221c1ac6801f03ed799f15b12">ucx_allocator_calloc</a></div><div class="ttdeci">void *(* ucx_allocator_calloc)(void *pool, size_t n, size_t size)</div><div class="ttdoc">A function pointer to the allocators calloc() function. </div><div class="ttdef"><b>Definition:</b> allocator.h:71</div></div>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
76 <div class="ttc" id="structUcxAllocator_html_aecce1840378ed53f1002190f4f87026f"><div class="ttname"><a href="structUcxAllocator.html#aecce1840378ed53f1002190f4f87026f">UcxAllocator::free</a></div><div class="ttdeci">ucx_allocator_free free</div><div class="ttdoc">The free() function for this allocator. </div><div class="ttdef"><b>Definition:</b> allocator.h:109</div></div>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
77 <div class="ttc" id="allocator_8h_html_a29f0f6a23a70db3b60635cd6dc384473"><div class="ttname"><a href="allocator_8h.html#a29f0f6a23a70db3b60635cd6dc384473">ucx_allocator_malloc</a></div><div class="ttdeci">void *(* ucx_allocator_malloc)(void *pool, size_t n)</div><div class="ttdoc">A function pointer to the allocators malloc() function. </div><div class="ttdef"><b>Definition:</b> allocator.h:65</div></div>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
78 <div class="ttc" id="allocator_8h_html_a98d2f1b341118b7a0e341fda5d8b2ebf"><div class="ttname"><a href="allocator_8h.html#a98d2f1b341118b7a0e341fda5d8b2ebf">ucx_default_allocator</a></div><div class="ttdeci">UcxAllocator * ucx_default_allocator()</div><div class="ttdoc">Returns a pointer to the default allocator. </div><div class="ttdef"><b>Definition:</b> allocator.c:41</div></div>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
79 <div class="ttc" id="allocator_8h_html_a3a0bfdd13d887012309c459b339f338f"><div class="ttname"><a href="allocator_8h.html#a3a0bfdd13d887012309c459b339f338f">ucx_default_calloc</a></div><div class="ttdeci">void * ucx_default_calloc(void *ignore, size_t n, size_t size)</div><div class="ttdoc">A wrapper for the standard libc calloc() function. </div><div class="ttdef"><b>Definition:</b> allocator.c:50</div></div>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
80 <div class="ttc" id="allocator_8h_html_a6d7cf038a806e327c5da37321d04e426"><div class="ttname"><a href="allocator_8h.html#a6d7cf038a806e327c5da37321d04e426">ucx_allocator_realloc</a></div><div class="ttdeci">void *(* ucx_allocator_realloc)(void *pool, void *data, size_t n)</div><div class="ttdoc">A function pointer to the allocators realloc() function. </div><div class="ttdef"><b>Definition:</b> allocator.h:77</div></div>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
81 <div class="ttc" id="allocator_8h_html_a47cfc8af626a86fcb93a2b14b90498ed"><div class="ttname"><a href="allocator_8h.html#a47cfc8af626a86fcb93a2b14b90498ed">ucx_default_realloc</a></div><div class="ttdeci">void * ucx_default_realloc(void *ignore, void *data, size_t n)</div><div class="ttdoc">A wrapper for the standard libc realloc() function. </div><div class="ttdef"><b>Definition:</b> allocator.c:54</div></div>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
82 <div class="ttc" id="allocator_8h_html_aaf2387ddaddd8ab4b267e6b00e5d6f7e"><div class="ttname"><a href="allocator_8h.html#aaf2387ddaddd8ab4b267e6b00e5d6f7e">ucx_allocator_free</a></div><div class="ttdeci">void(* ucx_allocator_free)(void *pool, void *data)</div><div class="ttdoc">A function pointer to the allocators free() function. </div><div class="ttdef"><b>Definition:</b> allocator.h:83</div></div>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
83 <div class="ttc" id="structUcxAllocator_html_ab94ec1cba45cc4e7d81e1588a11cbb62"><div class="ttname"><a href="structUcxAllocator.html#ab94ec1cba45cc4e7d81e1588a11cbb62">UcxAllocator::calloc</a></div><div class="ttdeci">ucx_allocator_calloc calloc</div><div class="ttdoc">The calloc() function for this allocator. </div><div class="ttdef"><b>Definition:</b> allocator.h:101</div></div>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
84 <div class="ttc" id="allocator_8h_html_a646d83aaaadfe33ae414c0fad8bfc52a"><div class="ttname"><a href="allocator_8h.html#a646d83aaaadfe33ae414c0fad8bfc52a">ucx_default_free</a></div><div class="ttdeci">void ucx_default_free(void *ignore, void *data)</div><div class="ttdoc">A wrapper for the standard libc free() function. </div><div class="ttdef"><b>Definition:</b> allocator.c:58</div></div>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
85 <div class="ttc" id="structUcxAllocator_html_a3550e3847f31d9e9ce3ffcb0d3440c15"><div class="ttname"><a href="structUcxAllocator.html#a3550e3847f31d9e9ce3ffcb0d3440c15">UcxAllocator::realloc</a></div><div class="ttdeci">ucx_allocator_realloc realloc</div><div class="ttdoc">The realloc() function for this allocator. </div><div class="ttdef"><b>Definition:</b> allocator.h:105</div></div>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
86 <div class="ttc" id="structUcxAllocator_html_a1b78012998d1c28be86dc595f8f0aac9"><div class="ttname"><a href="structUcxAllocator.html#a1b78012998d1c28be86dc595f8f0aac9">UcxAllocator::pool</a></div><div class="ttdeci">void * pool</div><div class="ttdoc">Pointer to an area of memory or a complex memory pool. </div><div class="ttdef"><b>Definition:</b> allocator.h:93</div></div>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
87 </div><!-- fragment --></div><!-- contents -->
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
88 <!-- start footer part -->
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
89 <hr class="footer"/><address class="footer"><small>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
90 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
91 <img class="footer" src="doxygen.png" alt="doxygen"/>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
92 </a> 1.8.13
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
93 </small></address>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
94 </body>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
95 </html>

mercurial