Update documentation.

This commit is contained in:
2026-10-08 20:15:08 +01:00
parent d036b284ef
commit e358b1ca0e
514 changed files with 42794 additions and 29088 deletions

View File

@@ -3,12 +3,12 @@
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.16.1"/>
<meta name="generator" content="Doxygen 1.18.0"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>libaaruformat: CacheHeader Struct Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<script type="text/javascript" src="codefolding.js"></script>
<script type="text/javascript" src="clipboard.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="navtreedata.js"></script>
@@ -35,22 +35,47 @@
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.16.1 -->
<!-- Generated by Doxygen 1.18.0 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search/",'.html');
let searchBox = new SearchBox("searchBox", "search/",'.html');
</script>
<script type="text/javascript">
$(function() { codefold.init(); });
document.addEventListener('DOMContentLoaded', codefold.init);
</script>
<script type="application/json" id="doxygen-config">
{
"relPath": "",
"generateTreeView": true,
"searchEngine": true,
"serverBasedSearch": false,
"disableIndex": false,
"dynamicMenus": true,
"fullSidebar": false
}
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
initMenu('',true,false,'search.php','Search',true);
$(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
<div id="main-nav-mobile">
<div class="sm sm-dox"><input id="main-menu-state" type="checkbox"/>
<label class="main-menu-btn" for="main-menu-state">
<span class="main-menu-btn-icon"></span> Toggle main menu visibility</label>
<span id="searchBoxPos1"></span>
</div>
</div><!-- main-nav-mobile -->
<div id="main-nav">
<ul class="sm sm-dox" id="main-menu">
<li id="searchBoxPos2">
<div id="MSearchBox" class="MSearchBoxInactive">
<span class="left">
<span id="MSearchSelect" class="search-icon"><span class="search-icon-dropdown"></span></span>
<input type="text" id="MSearchField" value="" placeholder="Search" accesskey="S"/>
</span><span class="right">
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><div id="MSearchCloseImg" class="close-icon"></div></a>
</span>
</div>
</li>
</ul>
</div><!-- main-nav -->
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
<div id="nav-tree">
@@ -58,20 +83,16 @@ $(function() {
<div id="nav-sync" class="sync"></div>
</div>
</div>
<div id="splitbar" style="-moz-user-select:none;"
class="ui-resizable-handle">
<div id="splitbar" class="ui-resizable-handle">
</div>
</div>
<script type="text/javascript">
$(function(){initNavTree('structCacheHeader.html','',''); });
document.addEventListener('DOMContentLoaded',() => { initNavTree('structCacheHeader.html','',''); });
</script>
<div id="container">
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
<div id="MSearchSelectWindow">
</div>
<!-- iframe showing the search results (closed by default) -->
@@ -100,23 +121,27 @@ $(function(){initNavTree('structCacheHeader.html','',''); });
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 id="header-pub-attribs" class="groupheader"><a id="pub-attribs" name="pub-attribs"></a>
Data Fields</h2></td></tr>
<tr class="memitem:ad3b962f8ce6c6115143cf581c7936e55" id="r_ad3b962f8ce6c6115143cf581c7936e55"><td class="memItemLeft">uint64_t&#160;</td><td class="memItemRight"><a class="el" href="#ad3b962f8ce6c6115143cf581c7936e55">max_items</a></td></tr>
<tr class="memdesc:ad3b962f8ce6c6115143cf581c7936e55"><td class="mdescLeft">&#160;</td><td class="mdescRight">Hard limit for number of entries. <br /></td></tr>
<tr class="memitem:af82718ebf5e59a398bc6e9428a389bb2" id="r_af82718ebf5e59a398bc6e9428a389bb2"><td class="memItemLeft">uint64_t&#160;</td><td class="memItemRight"><a class="el" href="#af82718ebf5e59a398bc6e9428a389bb2">max_bytes</a></td></tr>
<tr class="memdesc:af82718ebf5e59a398bc6e9428a389bb2"><td class="mdescLeft">&#160;</td><td class="mdescRight">Memory budget in bytes for the cached values. 0 means unlimited. <br /></td></tr>
<tr class="memitem:ae6521ccf8e75b0c9c70297af637b1eaa" id="r_ae6521ccf8e75b0c9c70297af637b1eaa"><td class="memItemLeft">uint64_t&#160;</td><td class="memItemRight"><a class="el" href="#ae6521ccf8e75b0c9c70297af637b1eaa">cur_bytes</a></td></tr>
<tr class="memdesc:ae6521ccf8e75b0c9c70297af637b1eaa"><td class="mdescLeft">&#160;</td><td class="mdescRight">Bytes currently held by the cached values. <br /></td></tr>
<tr class="memitem:a44229bb929d8949f3c2700d07123d224" id="r_a44229bb929d8949f3c2700d07123d224"><td class="memItemLeft">struct <a class="el" href="structCacheEntry.html">CacheEntry</a> *&#160;</td><td class="memItemRight"><a class="el" href="#a44229bb929d8949f3c2700d07123d224">cache</a></td></tr>
<tr class="memdesc:a44229bb929d8949f3c2700d07123d224"><td class="mdescLeft">&#160;</td><td class="mdescRight">Hash root (uthash). NULL when empty. <br /></td></tr>
<tr class="memitem:afeac54c794f8fece845e49954fd89f1a" id="r_afeac54c794f8fece845e49954fd89f1a"><td class="memItemLeft">void(*&#160;</td><td class="memItemRight"><a class="el" href="#afeac54c794f8fece845e49954fd89f1a">free_func</a> )(void *)</td></tr>
<tr class="memdesc:afeac54c794f8fece845e49954fd89f1a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Optional callback to free cached values. NULL if not needed. <br /></td></tr>
<tr class="memitem:a54d553e78f5d90cce34ee684829a410f" id="r_a54d553e78f5d90cce34ee684829a410f"><td class="memItemLeft">void(*)&#160;</td><td class="memItemRight"><a class="el" href="#a54d553e78f5d90cce34ee684829a410f">free_func</a> (void *)</td></tr>
<tr class="memdesc:a54d553e78f5d90cce34ee684829a410f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Optional callback to free cached values. NULL if not needed. <br /></td></tr>
</table>
<a name="details" id="details"></a><h2 id="header-details" class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Cache top-level descriptor encapsulating the hash table root and capacity limit. </p>
<p>The cache enforces an upper bound (max_items) on the number of tracked entries. On insert, the oldest entry is evicted when the limit is reached (LRU via uthash insertion order).</p>
<p>The cache is bounded by the total number of <em>bytes</em> held by its values, not by the number of entries: the caches in this library store values of wildly different sizes (a block header is a few dozen bytes, a decompressed data block is megabytes), so an entry-count limit cannot express a memory budget. On insert, the least recently used entries are evicted until the cache is back under max_bytes.</p>
<p>Fields:</p><ul>
<li>max_items: Maximum number of entries allowed; 0 means unlimited.</li>
<li>max_bytes: Memory budget in bytes; 0 means unlimited.</li>
<li>cur_bytes: Bytes currently held by the cached values.</li>
<li>cache: uthash root pointer; NULL when the cache is empty.</li>
<li>free_func: Optional callback to free cached values on eviction/clear. </li>
<li>free_func: Optional callback to free cached values on eviction/clear.</li>
</ul>
<p>The entry just inserted is never evicted, so a caller may keep using the pointer it handed over for the remainder of the call even if the value is larger than max_bytes. </p>
<p class="definition">Definition at line <a class="el" href="lru_8h_source.html#l00041">41</a> of file <a class="el" href="lru_8h_source.html">lru.h</a>.</p>
<p class="definition">Definition at line <a class="el" href="lru_8h_source.html#l00050">50</a> of file <a class="el" href="lru_8h_source.html">lru.h</a>.</p>
</div><a name="doc-variable-members" id="doc-variable-members"></a><h2 id="header-doc-variable-members" class="groupheader">Field Documentation</h2>
<a id="a44229bb929d8949f3c2700d07123d224" name="a44229bb929d8949f3c2700d07123d224"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a44229bb929d8949f3c2700d07123d224">&#9670;&#160;</a></span>cache</h2>
@@ -132,49 +157,69 @@ Data Fields</h2></td></tr>
<p>Hash root (uthash). NULL when empty. </p>
<p class="definition">Definition at line <a class="el" href="lru_8h_source.html#l00044">44</a> of file <a class="el" href="lru_8h_source.html">lru.h</a>.</p>
<p class="definition">Definition at line <a class="el" href="lru_8h_source.html#l00054">54</a> of file <a class="el" href="lru_8h_source.html">lru.h</a>.</p>
<p class="reference">Referenced by <a class="el" href="create_8c_source.html#l00291">aaruf_create()</a>, <a class="el" href="open_8c_source.html#l00236">aaruf_open()</a>, <a class="el" href="lru_8c_source.html#l00048">add_to_cache_uint64()</a>, <a class="el" href="lru_8c_source.html#l00024">find_in_cache_uint64()</a>, and <a class="el" href="lru_8c_source.html#l00082">free_cache()</a>.</p>
<p class="reference">Referenced by <a class="el" href="create_8c_source.html#l00291">aaruf_create()</a>, <a class="el" href="open_8c_source.html#l00236">aaruf_open()</a>, <a class="el" href="lru_8c_source.html#l00068">add_to_cache_uint64()</a>, <a class="el" href="lru_8c_source.html#l00020">drop_entry()</a>, <a class="el" href="lru_8c_source.html#l00041">find_in_cache_uint64()</a>, and <a class="el" href="lru_8c_source.html#l00118">free_cache()</a>.</p>
</div>
</div>
<a id="afeac54c794f8fece845e49954fd89f1a" name="afeac54c794f8fece845e49954fd89f1a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#afeac54c794f8fece845e49954fd89f1a">&#9670;&#160;</a></span>free_func</h2>
<a id="ae6521ccf8e75b0c9c70297af637b1eaa" name="ae6521ccf8e75b0c9c70297af637b1eaa"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae6521ccf8e75b0c9c70297af637b1eaa">&#9670;&#160;</a></span>cur_bytes</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void(* CacheHeader::free_func) (void *)</td>
<td class="memname">uint64_t CacheHeader::cur_bytes</td>
</tr>
</table>
</div><div class="memdoc">
<p>Bytes currently held by the cached values. </p>
<p class="definition">Definition at line <a class="el" href="lru_8h_source.html#l00053">53</a> of file <a class="el" href="lru_8h_source.html">lru.h</a>.</p>
<p class="reference">Referenced by <a class="el" href="create_8c_source.html#l00291">aaruf_create()</a>, <a class="el" href="open_8c_source.html#l00236">aaruf_open()</a>, <a class="el" href="lru_8c_source.html#l00068">add_to_cache_uint64()</a>, <a class="el" href="lru_8c_source.html#l00020">drop_entry()</a>, and <a class="el" href="lru_8c_source.html#l00118">free_cache()</a>.</p>
</div>
</div>
<a id="a54d553e78f5d90cce34ee684829a410f" name="a54d553e78f5d90cce34ee684829a410f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a54d553e78f5d90cce34ee684829a410f">&#9670;&#160;</a></span>free_func</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void(*) CacheHeader::free_func(void *)</td>
</tr>
</table>
</div><div class="memdoc">
<p>Optional callback to free cached values. NULL if not needed. </p>
<p class="definition">Definition at line <a class="el" href="lru_8h_source.html#l00045">45</a> of file <a class="el" href="lru_8h_source.html">lru.h</a>.</p>
<p class="definition">Definition at line <a class="el" href="lru_8h_source.html#l00055">55</a> of file <a class="el" href="lru_8h_source.html">lru.h</a>.</p>
<p class="reference">Referenced by <a class="el" href="open_8c_source.html#l00236">aaruf_open()</a>, <a class="el" href="lru_8c_source.html#l00048">add_to_cache_uint64()</a>, and <a class="el" href="lru_8c_source.html#l00082">free_cache()</a>.</p>
<p class="reference">Referenced by <a class="el" href="create_8c_source.html#l00291">aaruf_create()</a>, <a class="el" href="open_8c_source.html#l00236">aaruf_open()</a>, <a class="el" href="lru_8c_source.html#l00068">add_to_cache_uint64()</a>, and <a class="el" href="lru_8c_source.html#l00020">drop_entry()</a>.</p>
</div>
</div>
<a id="ad3b962f8ce6c6115143cf581c7936e55" name="ad3b962f8ce6c6115143cf581c7936e55"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad3b962f8ce6c6115143cf581c7936e55">&#9670;&#160;</a></span>max_items</h2>
<a id="af82718ebf5e59a398bc6e9428a389bb2" name="af82718ebf5e59a398bc6e9428a389bb2"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af82718ebf5e59a398bc6e9428a389bb2">&#9670;&#160;</a></span>max_bytes</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">uint64_t CacheHeader::max_items</td>
<td class="memname">uint64_t CacheHeader::max_bytes</td>
</tr>
</table>
</div><div class="memdoc">
<p>Hard limit for number of entries. </p>
<p>Memory budget in bytes for the cached values. 0 means unlimited. </p>
<p class="definition">Definition at line <a class="el" href="lru_8h_source.html#l00043">43</a> of file <a class="el" href="lru_8h_source.html">lru.h</a>.</p>
<p class="definition">Definition at line <a class="el" href="lru_8h_source.html#l00052">52</a> of file <a class="el" href="lru_8h_source.html">lru.h</a>.</p>
<p class="reference">Referenced by <a class="el" href="create_8c_source.html#l00291">aaruf_create()</a>, <a class="el" href="open_8c_source.html#l00236">aaruf_open()</a>, and <a class="el" href="lru_8c_source.html#l00048">add_to_cache_uint64()</a>.</p>
<p class="reference">Referenced by <a class="el" href="create_8c_source.html#l00291">aaruf_create()</a>, <a class="el" href="open_8c_source.html#l00236">aaruf_open()</a>, and <a class="el" href="lru_8c_source.html#l00068">add_to_cache_uint64()</a>.</p>
</div>
</div>
@@ -195,7 +240,7 @@ Data Fields</h2></td></tr>
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
<ul>
<li class="navelem"><a href="structCacheHeader.html">CacheHeader</a></li>
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.16.1 </li>
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.18.0 </li>
</ul>
</div>
</body>