/usr/share/gtk-doc/html/libvips/libvips-memory.html is in libvips-doc 7.28.5-1+deb7u1.
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 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 | <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>memory</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
<link rel="home" href="index.html" title="VIPS Reference Manual">
<link rel="up" href="ch01.html" title="Core VIPS API">
<link rel="prev" href="VipsObject.html" title="VipsObject">
<link rel="next" href="libvips-error.html" title="error">
<meta name="generator" content="GTK-Doc V1.18 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
<tr valign="middle">
<td><a accesskey="p" href="VipsObject.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
<td><a accesskey="u" href="ch01.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
<th width="100%" align="center">VIPS Reference Manual</th>
<td><a accesskey="n" href="libvips-error.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
</tr>
<tr><td colspan="5" class="shortcuts">
<a href="#libvips-memory.synopsis" class="shortcut">Top</a>
|
<a href="#libvips-memory.description" class="shortcut">Description</a>
</td></tr>
</table>
<div class="refentry">
<a name="libvips-memory"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="libvips-memory.top_of_page"></a>memory</span></h2>
<p>memory — memory utilities</p>
</td>
<td valign="top" align="right"></td>
</tr></table></div>
<div class="refsect1">
<a name="libvips-memory.stability-level"></a><h2>Stability Level</h2>
Stable, unless otherwise indicated
</div>
<div class="refsynopsisdiv">
<a name="libvips-memory.synopsis"></a><h2>Synopsis</h2>
<pre class="synopsis">
#include <vips/vips.h>
#define <a class="link" href="libvips-memory.html#VIPS-ARRAY:CAPS" title="VIPS_ARRAY()">VIPS_ARRAY</a> (OBJ,
N,
T)
#define <a class="link" href="libvips-memory.html#VIPS-FREE:CAPS" title="VIPS_FREE()">VIPS_FREE</a> (S)
#define <a class="link" href="libvips-memory.html#VIPS-FREEF:CAPS" title="VIPS_FREEF()">VIPS_FREEF</a> (F,
S)
#define <a class="link" href="libvips-memory.html#VIPS-NEW:CAPS" title="VIPS_NEW()">VIPS_NEW</a> (OBJ,
T)
#define <a class="link" href="libvips-memory.html#VIPS-SETSTR:CAPS" title="VIPS_SETSTR()">VIPS_SETSTR</a> (S,
V)
<span class="returnvalue">int</span> <a class="link" href="libvips-memory.html#vips-free" title="vips_free ()">vips_free</a> (<em class="parameter"><code><span class="type">void</span> *buf</code></em>);
<span class="returnvalue">void</span> * <a class="link" href="libvips-memory.html#vips-malloc" title="vips_malloc ()">vips_malloc</a> (<em class="parameter"><code><a class="link" href="VipsObject.html" title="VipsObject"><span class="type">VipsObject</span></a> *object</code></em>,
<em class="parameter"><code><span class="type">size_t</span> size</code></em>);
<span class="returnvalue">char</span> * <a class="link" href="libvips-memory.html#vips-strdup" title="vips_strdup ()">vips_strdup</a> (<em class="parameter"><code><a class="link" href="VipsObject.html" title="VipsObject"><span class="type">VipsObject</span></a> *object</code></em>,
<em class="parameter"><code>const <span class="type">char</span> *str</code></em>);
<span class="returnvalue">int</span> <a class="link" href="libvips-memory.html#vips-tracked-close" title="vips_tracked_close ()">vips_tracked_close</a> (<em class="parameter"><code><span class="type">int</span> fd</code></em>);
<span class="returnvalue">void</span> <a class="link" href="libvips-memory.html#vips-tracked-free" title="vips_tracked_free ()">vips_tracked_free</a> (<em class="parameter"><code><span class="type">void</span> *s</code></em>);
<span class="returnvalue">int</span> <a class="link" href="libvips-memory.html#vips-tracked-get-allocs" title="vips_tracked_get_allocs ()">vips_tracked_get_allocs</a> (<em class="parameter"><code><span class="type">void</span></code></em>);
<span class="returnvalue">int</span> <a class="link" href="libvips-memory.html#vips-tracked-get-files" title="vips_tracked_get_files ()">vips_tracked_get_files</a> (<em class="parameter"><code><span class="type">void</span></code></em>);
<span class="returnvalue">size_t</span> <a class="link" href="libvips-memory.html#vips-tracked-get-mem" title="vips_tracked_get_mem ()">vips_tracked_get_mem</a> (<em class="parameter"><code><span class="type">void</span></code></em>);
<span class="returnvalue">size_t</span> <a class="link" href="libvips-memory.html#vips-tracked-get-mem-highwater" title="vips_tracked_get_mem_highwater ()">vips_tracked_get_mem_highwater</a> (<em class="parameter"><code><span class="type">void</span></code></em>);
<span class="returnvalue">void</span> * <a class="link" href="libvips-memory.html#vips-tracked-malloc" title="vips_tracked_malloc ()">vips_tracked_malloc</a> (<em class="parameter"><code><span class="type">size_t</span> size</code></em>);
<span class="returnvalue">int</span> <a class="link" href="libvips-memory.html#vips-tracked-open" title="vips_tracked_open ()">vips_tracked_open</a> (<em class="parameter"><code>const <span class="type">char</span> *pathname</code></em>,
<em class="parameter"><code><span class="type">int</span> flags</code></em>,
<em class="parameter"><code>...</code></em>);
</pre>
</div>
<div class="refsect1">
<a name="libvips-memory.description"></a><h2>Description</h2>
<p>
These functions cover two main areas.
</p>
<p>
First, some simple utility functions over the underlying
<code class="function">g_malloc()</code>/<code class="function">g_free()</code> functions. Memory allocated and freeded using these
functions is interchangeable with any other glib library.
</p>
<p>
Second, a pair of functions, <a class="link" href="libvips-memory.html#vips-tracked-malloc" title="vips_tracked_malloc ()"><code class="function">vips_tracked_malloc()</code></a> and <a class="link" href="libvips-memory.html#vips-tracked-free" title="vips_tracked_free ()"><code class="function">vips_tracked_free()</code></a>,
which are NOT compatible. If you <code class="function">g_free()</code> memory that has been allocated
with <a class="link" href="libvips-memory.html#vips-tracked-malloc" title="vips_tracked_malloc ()"><code class="function">vips_tracked_malloc()</code></a> you will see crashes.
</p>
<p>
The tracked functions are
only suitable for large allocations internal to the library, for example
pixel buffers. libvips watches the total amount of live tracked memory and
uses this information to decide when to trim caches.
</p>
</div>
<div class="refsect1">
<a name="libvips-memory.details"></a><h2>Details</h2>
<div class="refsect2">
<a name="VIPS-ARRAY:CAPS"></a><h3>VIPS_ARRAY()</h3>
<pre class="programlisting">#define VIPS_ARRAY( OBJ, N, T )</pre>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>OBJ</code></em> :</span></p></td>
<td>allocate memory local to <em class="parameter"><code>OBJ</code></em>, or <code class="literal">NULL</code> for no auto-free</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>N</code></em> :</span></p></td>
<td>number of <em class="parameter"><code>T</code></em> 's to allocate</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>T</code></em> :</span></p></td>
<td>type of thing to allocate</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>A pointer of type <em class="parameter"><code>T</code></em> *, or <code class="literal">NULL</code> on error.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="VIPS-FREE:CAPS"></a><h3>VIPS_FREE()</h3>
<pre class="programlisting">#define VIPS_FREE( S ) VIPS_FREEF( g_free, (S) );
</pre>
</div>
<hr>
<div class="refsect2">
<a name="VIPS-FREEF:CAPS"></a><h3>VIPS_FREEF()</h3>
<pre class="programlisting">#define VIPS_FREEF( F, S )</pre>
</div>
<hr>
<div class="refsect2">
<a name="VIPS-NEW:CAPS"></a><h3>VIPS_NEW()</h3>
<pre class="programlisting">#define VIPS_NEW( OBJ, T )</pre>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>OBJ</code></em> :</span></p></td>
<td>allocate memory local to <em class="parameter"><code>OBJ</code></em>, or <code class="literal">NULL</code> for no auto-free</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>T</code></em> :</span></p></td>
<td>type of thing to allocate</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>A pointer of type <em class="parameter"><code>T</code></em> *, or <code class="literal">NULL</code> on error.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="VIPS-SETSTR:CAPS"></a><h3>VIPS_SETSTR()</h3>
<pre class="programlisting">#define VIPS_SETSTR( S, V )</pre>
</div>
<hr>
<div class="refsect2">
<a name="vips-free"></a><h3>vips_free ()</h3>
<pre class="programlisting"><span class="returnvalue">int</span> vips_free (<em class="parameter"><code><span class="type">void</span> *buf</code></em>);</pre>
<p>
Frees memory with <code class="function">g_free()</code> and returns 0. Handy for callbacks.
</p>
<p>
See also: <a class="link" href="libvips-memory.html#vips-malloc" title="vips_malloc ()"><code class="function">vips_malloc()</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><em class="parameter"><code>buf</code></em> :</span></p></td>
<td>memory to free</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="vips-malloc"></a><h3>vips_malloc ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span> * vips_malloc (<em class="parameter"><code><a class="link" href="VipsObject.html" title="VipsObject"><span class="type">VipsObject</span></a> *object</code></em>,
<em class="parameter"><code><span class="type">size_t</span> size</code></em>);</pre>
<p>
<code class="function">g_malloc()</code> local to <em class="parameter"><code>object</code></em>, that is, the memory will be automatically
freed for you when the object is closed. If <em class="parameter"><code>object</code></em> is <code class="literal">NULL</code>, you need to
free the memory explicitly with <code class="function">g_free()</code>.
</p>
<p>
This function cannot fail. See <a class="link" href="libvips-memory.html#vips-tracked-malloc" title="vips_tracked_malloc ()"><code class="function">vips_tracked_malloc()</code></a> if you are
allocating large amounts of memory.
</p>
<p>
See also: <a class="link" href="libvips-memory.html#vips-tracked-malloc" title="vips_tracked_malloc ()"><code class="function">vips_tracked_malloc()</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>object</code></em> :</span></p></td>
<td>allocate memory local to this <a class="link" href="VipsObject.html" title="VipsObject"><span class="type">VipsObject</span></a>, or <code class="literal">NULL</code>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>size</code></em> :</span></p></td>
<td>number of bytes to allocate</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>a pointer to the allocated memory</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="vips-strdup"></a><h3>vips_strdup ()</h3>
<pre class="programlisting"><span class="returnvalue">char</span> * vips_strdup (<em class="parameter"><code><a class="link" href="VipsObject.html" title="VipsObject"><span class="type">VipsObject</span></a> *object</code></em>,
<em class="parameter"><code>const <span class="type">char</span> *str</code></em>);</pre>
<p>
<code class="function">g_strdup()</code> a string. When <em class="parameter"><code>object</code></em> is freed, the string will be freed for
you. If <em class="parameter"><code>object</code></em> is <code class="literal">NULL</code>, you need to
free the memory explicitly with <code class="function">g_free()</code>.
</p>
<p>
This function cannot fail.
</p>
<p>
See also: <a class="link" href="libvips-memory.html#vips-malloc" title="vips_malloc ()"><code class="function">vips_malloc()</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>object</code></em> :</span></p></td>
<td>allocate memory local to this <a class="link" href="VipsObject.html" title="VipsObject"><span class="type">VipsObject</span></a>, or <code class="literal">NULL</code>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>str</code></em> :</span></p></td>
<td>string to copy</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>a pointer to the allocated memory</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="vips-tracked-close"></a><h3>vips_tracked_close ()</h3>
<pre class="programlisting"><span class="returnvalue">int</span> vips_tracked_close (<em class="parameter"><code><span class="type">int</span> fd</code></em>);</pre>
<p>
Exactly as close(2), but update the number of files currently open via
<a class="link" href="libvips-memory.html#vips-tracked-get-files" title="vips_tracked_get_files ()"><code class="function">vips_tracked_get_files()</code></a>. This is used
by the vips operation cache to drop cache when the number of files
available is low.
</p>
<p>
You must only close file descriptors opened with <a class="link" href="libvips-memory.html#vips-tracked-open" title="vips_tracked_open ()"><code class="function">vips_tracked_open()</code></a>.
</p>
<p>
See also: <a class="link" href="libvips-memory.html#vips-tracked-open" title="vips_tracked_open ()"><code class="function">vips_tracked_open()</code></a>, <a class="link" href="libvips-memory.html#vips-tracked-get-files" title="vips_tracked_get_files ()"><code class="function">vips_tracked_get_files()</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>fd</code></em> :</span></p></td>
<td>file to <code class="function">close()</code>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>a file descriptor, or -1 on error.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="vips-tracked-free"></a><h3>vips_tracked_free ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span> vips_tracked_free (<em class="parameter"><code><span class="type">void</span> *s</code></em>);</pre>
<p>
Only use it to free
memory that was previously allocated with <a class="link" href="libvips-memory.html#vips-tracked-malloc" title="vips_tracked_malloc ()"><code class="function">vips_tracked_malloc()</code></a> with a
<code class="literal">NULL</code> first argument.
</p>
<p>
See also: <a class="link" href="libvips-memory.html#vips-tracked-malloc" title="vips_tracked_malloc ()"><code class="function">vips_tracked_malloc()</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><em class="parameter"><code>s</code></em> :</span></p></td>
<td>memory to free</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="vips-tracked-get-allocs"></a><h3>vips_tracked_get_allocs ()</h3>
<pre class="programlisting"><span class="returnvalue">int</span> vips_tracked_get_allocs (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
<p>
Returns the number of active allocations.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>the number of active allocations</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="vips-tracked-get-files"></a><h3>vips_tracked_get_files ()</h3>
<pre class="programlisting"><span class="returnvalue">int</span> vips_tracked_get_files (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
<p>
Returns the number of open files.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>the number of open files</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="vips-tracked-get-mem"></a><h3>vips_tracked_get_mem ()</h3>
<pre class="programlisting"><span class="returnvalue">size_t</span> vips_tracked_get_mem (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
<p>
Returns the number of bytes currently allocated via <a class="link" href="libvips-memory.html#vips-malloc" title="vips_malloc ()"><code class="function">vips_malloc()</code></a> and
friends. vips uses this figure to decide when to start dropping cache, see
<a class="link" href="VipsOperation.html" title="VipsOperation"><span class="type">VipsOperation</span></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>the number of currently allocated bytes</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="vips-tracked-get-mem-highwater"></a><h3>vips_tracked_get_mem_highwater ()</h3>
<pre class="programlisting"><span class="returnvalue">size_t</span> vips_tracked_get_mem_highwater (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
<p>
Returns the largest number of bytes simultaneously allocated via
<a class="link" href="libvips-memory.html#vips-tracked-malloc" title="vips_tracked_malloc ()"><code class="function">vips_tracked_malloc()</code></a>. Handy for estimating max memory requirements for a
program.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>the largest number of currently allocated bytes</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="vips-tracked-malloc"></a><h3>vips_tracked_malloc ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span> * vips_tracked_malloc (<em class="parameter"><code><span class="type">size_t</span> size</code></em>);</pre>
<p>
Allocate an area of memory that will be tracked by <a class="link" href="libvips-memory.html#vips-tracked-get-mem" title="vips_tracked_get_mem ()"><code class="function">vips_tracked_get_mem()</code></a>
and friends.
</p>
<p>
If allocation fails, <a class="link" href="libvips-memory.html#vips-malloc" title="vips_malloc ()"><code class="function">vips_malloc()</code></a> returns <code class="literal">NULL</code> and
sets an error message.
</p>
<p>
You must only free the memory returned with <a class="link" href="libvips-memory.html#vips-tracked-free" title="vips_tracked_free ()"><code class="function">vips_tracked_free()</code></a>.
</p>
<p>
See also: <a class="link" href="libvips-memory.html#vips-tracked-free" title="vips_tracked_free ()"><code class="function">vips_tracked_free()</code></a>, <a class="link" href="libvips-memory.html#vips-malloc" title="vips_malloc ()"><code class="function">vips_malloc()</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>size</code></em> :</span></p></td>
<td>number of bytes to allocate</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>a pointer to the allocated memory, or <code class="literal">NULL</code> on error.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="vips-tracked-open"></a><h3>vips_tracked_open ()</h3>
<pre class="programlisting"><span class="returnvalue">int</span> vips_tracked_open (<em class="parameter"><code>const <span class="type">char</span> *pathname</code></em>,
<em class="parameter"><code><span class="type">int</span> flags</code></em>,
<em class="parameter"><code>...</code></em>);</pre>
<p>
Exactly as open(2), but the number of files current open via
<a class="link" href="libvips-memory.html#vips-tracked-open" title="vips_tracked_open ()"><code class="function">vips_tracked_open()</code></a> is available via <a class="link" href="libvips-memory.html#vips-tracked-get-files" title="vips_tracked_get_files ()"><code class="function">vips_tracked_get_files()</code></a>. This is used
by the vips operation cache to drop cache when the number of files
available is low.
</p>
<p>
You must only close the file descriptor with <a class="link" href="libvips-memory.html#vips-tracked-close" title="vips_tracked_close ()"><code class="function">vips_tracked_close()</code></a>.
</p>
<p>
See also: <a class="link" href="libvips-memory.html#vips-tracked-close" title="vips_tracked_close ()"><code class="function">vips_tracked_close()</code></a>, <a class="link" href="libvips-memory.html#vips-tracked-get-files" title="vips_tracked_get_files ()"><code class="function">vips_tracked_get_files()</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>pathname</code></em> :</span></p></td>
<td>name of file to open</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>flags</code></em> :</span></p></td>
<td>flags for <code class="function">open()</code>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>mode</code></em> :</span></p></td>
<td>open mode</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>a file descriptor, or -1 on error.</td>
</tr>
</tbody>
</table></div>
</div>
</div>
</div>
<div class="footer">
<hr>
Generated by GTK-Doc V1.18</div>
</body>
</html>
|