This file is indexed.

/usr/share/doc/liblzma-doc/html/hardware_8c.html is in liblzma-doc 5.1.1alpha+20120614-2.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>XZ Utils: xz/hardware.c File 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>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">XZ Utils
   &#160;<span id="projectnumber">5.1.0alpha</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.1.2 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
      <li><a href="globals.html"><span>Globals</span></a></li>
    </ul>
  </div>
<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_53e01eec41348db90f08d9ee7e6793af.html">xz</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#func-members">Functions</a> &#124;
<a href="#var-members">Variables</a>  </div>
  <div class="headertitle">
<div class="title">hardware.c File Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>Detection of available hardware resources.  
<a href="#details">More...</a></p>
<div class="textblock"><code>#include &quot;<a class="el" href="private_8h.html">private.h</a>&quot;</code><br/>
<code>#include &quot;<a class="el" href="tuklib__cpucores_8h.html">tuklib_cpucores.h</a>&quot;</code><br/>
</div><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:ad96d3674203376efcce48b910a95594f"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="hardware_8c.html#ad96d3674203376efcce48b910a95594f">hardware_threadlimit_set</a> (uint32_t new_threadlimit)</td></tr>
<tr class="memdesc:ad96d3674203376efcce48b910a95594f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set custom value for maximum number of coder threads.  <a href="#ad96d3674203376efcce48b910a95594f"></a><br/></td></tr>
<tr class="memitem:a2a105bd525dc158db95c7868c3fc167a"><td class="memItemLeft" align="right" valign="top">uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="hardware_8c.html#a2a105bd525dc158db95c7868c3fc167a">hardware_threadlimit_get</a> (void)</td></tr>
<tr class="memitem:a00d0e7d3dfbc21538d84a6fa4d0a70c0"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="hardware_8c.html#a00d0e7d3dfbc21538d84a6fa4d0a70c0">hardware_memlimit_set</a> (uint64_t new_memlimit, bool set_compress, bool set_decompress, bool is_percentage)</td></tr>
<tr class="memitem:af8f63ad66d839bff50e46464f0ad630f"><td class="memItemLeft" align="right" valign="top">uint64_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="hardware_8c.html#af8f63ad66d839bff50e46464f0ad630f">hardware_memlimit_get</a> (enum operation_mode mode)</td></tr>
<tr class="memdesc:af8f63ad66d839bff50e46464f0ad630f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the current memory usage limit for compression or decompression.  <a href="#af8f63ad66d839bff50e46464f0ad630f"></a><br/></td></tr>
<tr class="memitem:ad56580adea56000e543fb4cda80fc003"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="hardware_8c.html#ad56580adea56000e543fb4cda80fc003">memlimit_show</a> (const char *str, uint64_t value)</td></tr>
<tr class="memdesc:ad56580adea56000e543fb4cda80fc003"><td class="mdescLeft">&#160;</td><td class="mdescRight">Helper for <a class="el" href="hardware_8c.html#a7b6901e0938a5a55c5724b4ac42ea3e4" title="Display the amount of RAM and memory usage limits and exit.">hardware_memlimit_show()</a> to print one human-readable info line.  <a href="#ad56580adea56000e543fb4cda80fc003"></a><br/></td></tr>
<tr class="memitem:a7b6901e0938a5a55c5724b4ac42ea3e4"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="hardware_8c.html#a7b6901e0938a5a55c5724b4ac42ea3e4">hardware_memlimit_show</a> (void)</td></tr>
<tr class="memdesc:a7b6901e0938a5a55c5724b4ac42ea3e4"><td class="mdescLeft">&#160;</td><td class="mdescRight">Display the amount of RAM and memory usage limits and exit.  <a href="#a7b6901e0938a5a55c5724b4ac42ea3e4"></a><br/></td></tr>
<tr class="memitem:a47191dfa6786da2498eb49ae28f8d361"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="hardware_8c.html#a47191dfa6786da2498eb49ae28f8d361">hardware_init</a> (void)</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2><a name="var-members"></a>
Variables</h2></td></tr>
<tr class="memitem:a3ed420725c7a470668038c37e21aa6c7"><td class="memItemLeft" align="right" valign="top">static uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="hardware_8c.html#a3ed420725c7a470668038c37e21aa6c7">threadlimit</a></td></tr>
<tr class="memitem:a480d1795efd25be46715244fade38e34"><td class="memItemLeft" align="right" valign="top">static uint64_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="hardware_8c.html#a480d1795efd25be46715244fade38e34">memlimit_compress</a></td></tr>
<tr class="memdesc:a480d1795efd25be46715244fade38e34"><td class="mdescLeft">&#160;</td><td class="mdescRight">Memory usage limit for compression.  <a href="#a480d1795efd25be46715244fade38e34"></a><br/></td></tr>
<tr class="memitem:adcc72cef875d7fdc985d66bf61f9de38"><td class="memItemLeft" align="right" valign="top">static uint64_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="hardware_8c.html#adcc72cef875d7fdc985d66bf61f9de38">memlimit_decompress</a></td></tr>
<tr class="memdesc:adcc72cef875d7fdc985d66bf61f9de38"><td class="mdescLeft">&#160;</td><td class="mdescRight">Memory usage limit for decompression.  <a href="#adcc72cef875d7fdc985d66bf61f9de38"></a><br/></td></tr>
<tr class="memitem:a3bade126d9aa72b3e34532c13828c955"><td class="memItemLeft" align="right" valign="top">static uint64_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="hardware_8c.html#a3bade126d9aa72b3e34532c13828c955">total_ram</a></td></tr>
<tr class="memdesc:a3bade126d9aa72b3e34532c13828c955"><td class="mdescLeft">&#160;</td><td class="mdescRight">Total amount of physical RAM.  <a href="#a3bade126d9aa72b3e34532c13828c955"></a><br/></td></tr>
</table>
<a name="details" id="details"></a><h2>Detailed Description</h2>
<div class="textblock"><p>Detection of available hardware resources. </p>
</div><h2>Function Documentation</h2>
<a class="anchor" id="ad96d3674203376efcce48b910a95594f"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void hardware_threadlimit_set </td>
          <td>(</td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>new_threadlimit</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Set custom value for maximum number of coder threads. </p>

<p>References <a class="el" href="hardware_8c.html#a3ed420725c7a470668038c37e21aa6c7">threadlimit</a>.</p>

<p>Referenced by <a class="el" href="hardware_8c.html#a47191dfa6786da2498eb49ae28f8d361">hardware_init()</a>.</p>

</div>
</div>
<a class="anchor" id="a2a105bd525dc158db95c7868c3fc167a"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">uint32_t hardware_threadlimit_get </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Get the maximum number of coder threads. Some additional helper threads are allowed on top of this). </p>

<p>References <a class="el" href="hardware_8c.html#a3ed420725c7a470668038c37e21aa6c7">threadlimit</a>.</p>

</div>
</div>
<a class="anchor" id="a00d0e7d3dfbc21538d84a6fa4d0a70c0"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void hardware_memlimit_set </td>
          <td>(</td>
          <td class="paramtype">uint64_t&#160;</td>
          <td class="paramname"><em>new_memlimit</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>set_compress</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>set_decompress</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>is_percentage</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Set the memory usage limit. There are separate limits for compression and decompression (the latter includes also &ndash;list), one or both can be set with a single call to this function. Zero indicates resetting the limit back to the defaults. The limit can also be set as a percentage of installed RAM; the percentage must be in the range [1, 100]. </p>

<p>References <a class="el" href="hardware_8c.html#a480d1795efd25be46715244fade38e34">memlimit_compress</a>, <a class="el" href="hardware_8c.html#adcc72cef875d7fdc985d66bf61f9de38">memlimit_decompress</a>, and <a class="el" href="hardware_8c.html#a3bade126d9aa72b3e34532c13828c955">total_ram</a>.</p>

<p>Referenced by <a class="el" href="hardware_8c.html#a47191dfa6786da2498eb49ae28f8d361">hardware_init()</a>, and <a class="el" href="args_8c.html#a1a3fb962627ec1e052317c46a8b351ff">parse_memlimit()</a>.</p>

</div>
</div>
<a class="anchor" id="af8f63ad66d839bff50e46464f0ad630f"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">uint64_t hardware_memlimit_get </td>
          <td>(</td>
          <td class="paramtype">enum operation_mode&#160;</td>
          <td class="paramname"><em>mode</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Get the current memory usage limit for compression or decompression. </p>

<p>References <a class="el" href="hardware_8c.html#a480d1795efd25be46715244fade38e34">memlimit_compress</a>, and <a class="el" href="hardware_8c.html#adcc72cef875d7fdc985d66bf61f9de38">memlimit_decompress</a>.</p>

<p>Referenced by <a class="el" href="coder_8c.html#a6848d01092ac252b6270f739af63e202">coder_init()</a>, <a class="el" href="message_8h.html#a6953ba5a13ff12f32091346b5772e992">message_mem_needed()</a>, and <a class="el" href="list_8c.html#ada243f83a8540051b161d0a114ef8f24">parse_indexes()</a>.</p>

</div>
</div>
<a class="anchor" id="ad56580adea56000e543fb4cda80fc003"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static void memlimit_show </td>
          <td>(</td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>str</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint64_t&#160;</td>
          <td class="paramname"><em>value</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Helper for <a class="el" href="hardware_8c.html#a7b6901e0938a5a55c5724b4ac42ea3e4" title="Display the amount of RAM and memory usage limits and exit.">hardware_memlimit_show()</a> to print one human-readable info line. </p>

<p>References <a class="el" href="util_8c.html#aecb8fdaf99a830f7fe8697ca87f8acea">round_up_to_mib()</a>, and <a class="el" href="util_8c.html#a157dec70513354b09a89166c74ddac53">uint64_to_str()</a>.</p>

<p>Referenced by <a class="el" href="hardware_8c.html#a7b6901e0938a5a55c5724b4ac42ea3e4">hardware_memlimit_show()</a>.</p>

</div>
</div>
<a class="anchor" id="a7b6901e0938a5a55c5724b4ac42ea3e4"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void hardware_memlimit_show </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Display the amount of RAM and memory usage limits and exit. </p>

<p>References <a class="el" href="hardware_8c.html#a480d1795efd25be46715244fade38e34">memlimit_compress</a>, <a class="el" href="hardware_8c.html#adcc72cef875d7fdc985d66bf61f9de38">memlimit_decompress</a>, <a class="el" href="hardware_8c.html#ad56580adea56000e543fb4cda80fc003">memlimit_show()</a>, <a class="el" href="message_8c.html#afa4674026a909bd210c5e4dd224bf28b">message_verbosity_get()</a>, <a class="el" href="hardware_8c.html#a3bade126d9aa72b3e34532c13828c955">total_ram</a>, and <a class="el" href="message_8h.html#a36bc083ed62e2e0fdcda60f1c2e1153dab0df7bba0caa9f37bc90395cc7cda544">V_SILENT</a>.</p>

</div>
</div>
<a class="anchor" id="a47191dfa6786da2498eb49ae28f8d361"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void hardware_init </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Initialize some hardware-specific variables, which are needed by other hardware_* functions. </p>

<p>References <a class="el" href="hardware_8c.html#a00d0e7d3dfbc21538d84a6fa4d0a70c0">hardware_memlimit_set()</a>, <a class="el" href="hardware_8c.html#ad96d3674203376efcce48b910a95594f">hardware_threadlimit_set()</a>, <a class="el" href="liblzma_2api_2lzma_2hardware_8h.html#a85363e453b34272a9f26c9fdffb041ee">lzma_physmem()</a>, and <a class="el" href="hardware_8c.html#a3bade126d9aa72b3e34532c13828c955">total_ram</a>.</p>

</div>
</div>
<h2>Variable Documentation</h2>
<a class="anchor" id="a3ed420725c7a470668038c37e21aa6c7"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">uint32_t threadlimit</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Maximum number of free <em>coder</em> threads. This can be set with the &ndash;threads=NUM command line option. </p>

<p>Referenced by <a class="el" href="hardware_8c.html#a2a105bd525dc158db95c7868c3fc167a">hardware_threadlimit_get()</a>, and <a class="el" href="hardware_8c.html#ad96d3674203376efcce48b910a95594f">hardware_threadlimit_set()</a>.</p>

</div>
</div>
<a class="anchor" id="a480d1795efd25be46715244fade38e34"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">uint64_t memlimit_compress</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Memory usage limit for compression. </p>

<p>Referenced by <a class="el" href="hardware_8c.html#af8f63ad66d839bff50e46464f0ad630f">hardware_memlimit_get()</a>, <a class="el" href="hardware_8c.html#a00d0e7d3dfbc21538d84a6fa4d0a70c0">hardware_memlimit_set()</a>, and <a class="el" href="hardware_8c.html#a7b6901e0938a5a55c5724b4ac42ea3e4">hardware_memlimit_show()</a>.</p>

</div>
</div>
<a class="anchor" id="adcc72cef875d7fdc985d66bf61f9de38"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">uint64_t memlimit_decompress</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Memory usage limit for decompression. </p>

<p>Referenced by <a class="el" href="hardware_8c.html#af8f63ad66d839bff50e46464f0ad630f">hardware_memlimit_get()</a>, <a class="el" href="hardware_8c.html#a00d0e7d3dfbc21538d84a6fa4d0a70c0">hardware_memlimit_set()</a>, and <a class="el" href="hardware_8c.html#a7b6901e0938a5a55c5724b4ac42ea3e4">hardware_memlimit_show()</a>.</p>

</div>
</div>
<a class="anchor" id="a3bade126d9aa72b3e34532c13828c955"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">uint64_t total_ram</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Total amount of physical RAM. </p>

<p>Referenced by <a class="el" href="hardware_8c.html#a47191dfa6786da2498eb49ae28f8d361">hardware_init()</a>, <a class="el" href="hardware_8c.html#a00d0e7d3dfbc21538d84a6fa4d0a70c0">hardware_memlimit_set()</a>, and <a class="el" href="hardware_8c.html#a7b6901e0938a5a55c5724b4ac42ea3e4">hardware_memlimit_show()</a>.</p>

</div>
</div>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Sun Nov 18 2012 19:30:21 for XZ Utils by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.1.2
</small></address>
</body>
</html>