<ahref="hash__map_8h.html">Go to the documentation of this file.</a><divclass="fragment"><divclass="line"><aid="l00001"name="l00001"></a><spanclass="lineno"> 1</span><spanclass="comment">/*</span></div>
<divclass="line"><aid="l00002"name="l00002"></a><spanclass="lineno"> 2</span><spanclass="comment"> * This file is part of the Aaru Data Preservation Suite.</span></div>
<divclass="line"><aid="l00005"name="l00005"></a><spanclass="lineno"> 5</span><spanclass="comment"> * This library is free software; you can redistribute it and/or modify</span></div>
<divclass="line"><aid="l00006"name="l00006"></a><spanclass="lineno"> 6</span><spanclass="comment"> * it under the terms of the GNU Lesser General Public License as</span></div>
<divclass="line"><aid="l00007"name="l00007"></a><spanclass="lineno"> 7</span><spanclass="comment"> * published by the Free Software Foundation; either version 2.1 of the</span></div>
<divclass="line"><aid="l00008"name="l00008"></a><spanclass="lineno"> 8</span><spanclass="comment"> * License, or (at your option) any later version.</span></div>
<divclass="line"><aid="l00010"name="l00010"></a><spanclass="lineno"> 10</span><spanclass="comment"> * This library is distributed in the hope that it will be useful, but</span></div>
<divclass="line"><aid="l00011"name="l00011"></a><spanclass="lineno"> 11</span><spanclass="comment"> * WITHOUT ANY WARRANTY; without even the implied warranty of</span></div>
<divclass="line"><aid="l00012"name="l00012"></a><spanclass="lineno"> 12</span><spanclass="comment"> * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU</span></div>
<divclass="line"><aid="l00013"name="l00013"></a><spanclass="lineno"> 13</span><spanclass="comment"> * Lesser General Public License for more details.</span></div>
<divclass="line"><aid="l00015"name="l00015"></a><spanclass="lineno"> 15</span><spanclass="comment"> * You should have received a copy of the GNU Lesser General Public</span></div>
<divclass="line"><aid="l00016"name="l00016"></a><spanclass="lineno"> 16</span><spanclass="comment"> * License along with this library; if not, see <http://www.gnu.org/licenses/>.</span></div>
<divclass="ttc"id="ahash__map_8h_html_a0719b4ee8aaa73765678b6b1db733fcd"><divclass="ttname"><ahref="hash__map_8h.html#a0719b4ee8aaa73765678b6b1db733fcd">lookup_map</a></div><divclass="ttdeci">bool lookup_map(const hash_map_t *map, uint64_t key, uint64_t *out_value)</div><divclass="ttdoc">Looks up a value by key in the hash map.</div><divclass="ttdef"><b>Definition</b><ahref="hash__map_8c_source.html#l00228">hash_map.c:228</a></div></div>
<divclass="ttc"id="ahash__map_8h_html_a4698f62d88ee9530fb93bf672455676f"><divclass="ttname"><ahref="hash__map_8h.html#a4698f62d88ee9530fb93bf672455676f">create_map</a></div><divclass="ttdeci">hash_map_t * create_map(size_t size)</div><divclass="ttdoc">Creates a new hash map with the specified initial size.</div><divclass="ttdef"><b>Definition</b><ahref="hash__map_8c_source.html#l00051">hash_map.c:51</a></div></div>
<divclass="ttc"id="ahash__map_8h_html_a56a11edd19b5362f1dd719a11c06f892"><divclass="ttname"><ahref="hash__map_8h.html#a56a11edd19b5362f1dd719a11c06f892">insert_map</a></div><divclass="ttdeci">bool insert_map(hash_map_t *map, uint64_t key, uint64_t value)</div><divclass="ttdoc">Inserts a key-value pair into the hash map.</div><divclass="ttdef"><b>Definition</b><ahref="hash__map_8c_source.html#l00185">hash_map.c:185</a></div></div>
<divclass="ttc"id="ahash__map_8h_html_ab885e8c5bedaf6f3cca1877e378fd04f"><divclass="ttname"><ahref="hash__map_8h.html#ab885e8c5bedaf6f3cca1877e378fd04f">free_map</a></div><divclass="ttdeci">void free_map(hash_map_t *map)</div><divclass="ttdoc">Frees all memory associated with a hash map.</div><divclass="ttdef"><b>Definition</b><ahref="hash__map_8c_source.html#l00078">hash_map.c:78</a></div></div>
<divclass="ttc"id="astructhash__map__t_html"><divclass="ttname"><ahref="structhash__map__t.html">hash_map_t</a></div><divclass="ttdoc">Minimal open-addressing hash map for 64-bit key/value pairs used in deduplication lookup.</div><divclass="ttdef"><b>Definition</b><ahref="#l00049">hash_map.h:50</a></div></div>
<divclass="ttc"id="astructhash__map__t_html_a32b1f62bf18d74209db0afe797d69bae"><divclass="ttname"><ahref="structhash__map__t.html#a32b1f62bf18d74209db0afe797d69bae">hash_map_t::count</a></div><divclass="ttdeci">size_t count</div><divclass="ttdoc">Number of active (filled) entries.</div><divclass="ttdef"><b>Definition</b><ahref="#l00053">hash_map.h:53</a></div></div>
<divclass="ttc"id="astructhash__map__t_html_acfa07d46992978b9a9d07522fcf920b8"><divclass="ttname"><ahref="structhash__map__t.html#acfa07d46992978b9a9d07522fcf920b8">hash_map_t::size</a></div><divclass="ttdeci">size_t size</div><divclass="ttdoc">Allocated slot capacity of table.</div><divclass="ttdef"><b>Definition</b><ahref="#l00052">hash_map.h:52</a></div></div>
<divclass="ttc"id="astructhash__map__t_html_aeaa8747727df544b4757e6c46aa8779f"><divclass="ttname"><ahref="structhash__map__t.html#aeaa8747727df544b4757e6c46aa8779f">hash_map_t::table</a></div><divclass="ttdeci">kv_pair_t * table</div><divclass="ttdoc">Array of key/value slots of length == size.</div><divclass="ttdef"><b>Definition</b><ahref="#l00051">hash_map.h:51</a></div></div>
<divclass="ttc"id="astructkv__pair__t_html"><divclass="ttname"><ahref="structkv__pair__t.html">kv_pair_t</a></div><divclass="ttdoc">Single key/value slot used internally by the open-addressing hash map.</div><divclass="ttdef"><b>Definition</b><ahref="#l00032">hash_map.h:33</a></div></div>
<divclass="ttc"id="astructkv__pair__t_html_adf26f353bbdec145acb6e64403f94179"><divclass="ttname"><ahref="structkv__pair__t.html#adf26f353bbdec145acb6e64403f94179">kv_pair_t::value</a></div><divclass="ttdeci">uint64_t value</div><divclass="ttdoc">Associated value payload (64-bit) stored alongside the key.</div><divclass="ttdef"><b>Definition</b><ahref="#l00035">hash_map.h:35</a></div></div>
<divclass="ttc"id="astructkv__pair__t_html_af199f6a611354ad86e985d885f72ea02"><divclass="ttname"><ahref="structkv__pair__t.html#af199f6a611354ad86e985d885f72ea02">kv_pair_t::key</a></div><divclass="ttdeci">uint64_t key</div><divclass="ttdoc">Stored key (64-bit). May use a reserved sentinel to denote an empty slot.</div><divclass="ttdef"><b>Definition</b><ahref="#l00034">hash_map.h:34</a></div></div>
</div><!-- fragment --></div><!-- contents -->
</div><!-- doc-content -->
</div><!-- container -->
<!-- start footer part -->
<divid="nav-path"class="navpath"><!-- id is needed for treeview function! -->
<liclass="footer">Generated by <ahref="https://www.doxygen.org/index.html"><imgclass="footer"src="doxygen.svg"width="104"height="31"alt="doxygen"/></a> 1.15.0 </li>