/usr/share/polipo/www/doc/OS-usage-limits.html is in polipo 1.0.4.1-1.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 | <html lang="en">
<head>
<title>OS usage limits - The Polipo Manual</title>
<meta http-equiv="Content-Type" content="text/html">
<meta name="description" content="The Polipo Manual">
<meta name="generator" content="makeinfo 4.13">
<link title="Top" rel="start" href="index.html#Top">
<link rel="up" href="Limiting-memory-usage.html#Limiting-memory-usage" title="Limiting memory usage">
<link rel="prev" href="Limiting-object-usage.html#Limiting-object-usage" title="Limiting object usage">
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
<!--
Copyright (C) 2003 -- 2006 by Juliusz Chroboczek.-->
<meta http-equiv="Content-Style-Type" content="text/css">
<style type="text/css"><!--
pre.display { font-family:inherit }
pre.format { font-family:inherit }
pre.smalldisplay { font-family:inherit; font-size:smaller }
pre.smallformat { font-family:inherit; font-size:smaller }
pre.smallexample { font-size:smaller }
pre.smalllisp { font-size:smaller }
span.sc { font-variant:small-caps }
span.roman { font-family:serif; font-weight:normal; }
span.sansserif { font-family:sans-serif; font-weight:normal; }
--></style>
</head>
<body>
<div class="node">
<a name="OS-usage-limits"></a>
<p>
Previous: <a rel="previous" accesskey="p" href="Limiting-object-usage.html#Limiting-object-usage">Limiting object usage</a>,
Up: <a rel="up" accesskey="u" href="Limiting-memory-usage.html#Limiting-memory-usage">Limiting memory usage</a>
<hr>
</div>
<h4 class="subsection">5.3.3 OS usage limits</h4>
<p><a name="index-usage-limit-241"></a><a name="index-ulimit-242"></a><a name="index-OOM-killer-243"></a>
Many operating systems permit limiting a process' memory usage by
setting a <dfn>usage limit</dfn>; on most Unix-like systems, this is done
with the <samp><span class="option">-v</span></samp> option to the <samp><span class="command">ulimit</span></samp> command.
Typically, the effect is to cause calls to the <code>malloc</code> and
<code>mmap</code> library functions to fail.
<p>Polipo will usually react gracefully to failures to allocate
memory<a rel="footnote" href="#fn-1" name="fnd-1"><sup>1</sup></a>. Nonetheless, you should avoid using
OS limits to limit Polipo's memory usage: when it hits an OS limit,
Polipo cannot allocate the memory needed to schedule recovery from the
out-of-memory condition, and has no choice other than to drop a
connection.
<p>Unfortunately, some operating system kernels (notably certain Linux
releases) fail to fail an allocation if no usage limit is given;
instead, they either crash when memory is exhausted, or else start
killing random processes with no advance warning<a rel="footnote" href="#fn-2" name="fnd-2"><sup>2</sup></a>. On such systems, imposing an
(unrealistically large) usage limit on Polipo is the safe thing to do.
<div class="footnote">
<hr>
<h4>Fußnoten</h4><p class="footnote"><small>[<a name="fn-1" href="#fnd-1">1</a>]</small> There are exactly three places in the code where
Polipo will give up and exit if out of memory; all three are extremely
unlikely to happen in practice.</p>
<p class="footnote"><small>[<a name="fn-2" href="#fnd-2">2</a>]</small> How I wish
for a ‘<samp><span class="samp">SIGXMEM</span></samp>’ signal.</p>
<hr></div>
</body></html>
|