Add MALLCTL_ARENAS_ALL.
Add the MALLCTL_ARENAS_ALL cpp macro as a fixed index for use in accessing the arena.<i>.{purge,decay,dss} and stats.arenas.<i>.* mallctls, and deprecate access via the arenas.narenas index (to be removed in 6.0.0).
This commit is contained in:
@@ -694,12 +694,22 @@ for (i = 0; i < nbins; i++) {
|
||||
any. A name element encoded as <literal><i></literal> or
|
||||
<literal><j></literal> indicates an integer component, where the
|
||||
integer varies from 0 to some upper value that must be determined via
|
||||
introspection. In the case of <mallctl>stats.arenas.<i>.*</mallctl>,
|
||||
<literal><i></literal> equal to <link
|
||||
linkend="arenas.narenas"><mallctl>arenas.narenas</mallctl></link> can be
|
||||
used to access the summation of statistics from all arenas. Take special
|
||||
note of the <link linkend="epoch"><mallctl>epoch</mallctl></link> mallctl,
|
||||
which controls refreshing of cached dynamic statistics.</para>
|
||||
introspection. In the case of <mallctl>stats.arenas.<i>.*</mallctl>
|
||||
and <mallctl>arena.<i>.{purge,decay,dss}</mallctl>,
|
||||
<literal><i></literal> equal to
|
||||
<constant>MALLCTL_ARENAS_ALL</constant> can be used to operate on all arenas
|
||||
or access the summation of statistics from all arenas. This constant can be
|
||||
utilized either via <function>mallctlnametomib()</function> followed by
|
||||
<function>mallctlbymib()</function>, or via code such as the following:
|
||||
<programlisting language="C"><![CDATA[
|
||||
#define STRINGIFY_HELPER(x) #x
|
||||
#define STRINGIFY(x) STRINGIFY_HELPER(x)
|
||||
|
||||
mallctl("arena." STRINGIFY(MALLCTL_ARENAS_ALL) ".decay",
|
||||
NULL, NULL, NULL, 0);]]></programlisting>
|
||||
Take special note of the
|
||||
<link linkend="epoch"><mallctl>epoch</mallctl></link> mallctl, which
|
||||
controls refreshing of cached dynamic statistics.</para>
|
||||
|
||||
<variablelist>
|
||||
<varlistentry id="version">
|
||||
@@ -1422,8 +1432,7 @@ malloc_conf = "xmalloc:true";]]></programlisting>
|
||||
<literal>--</literal>
|
||||
</term>
|
||||
<listitem><para>Purge all unused dirty pages for arena <i>, or for
|
||||
all arenas if <i> equals <link
|
||||
linkend="arenas.narenas"><mallctl>arenas.narenas</mallctl></link>.
|
||||
all arenas if <i> equals <constant>MALLCTL_ARENAS_ALL</constant>.
|
||||
</para></listitem>
|
||||
</varlistentry>
|
||||
|
||||
@@ -1434,10 +1443,9 @@ malloc_conf = "xmalloc:true";]]></programlisting>
|
||||
<literal>--</literal>
|
||||
</term>
|
||||
<listitem><para>Trigger decay-based purging of unused dirty pages for
|
||||
arena <i>, or for all arenas if <i> equals <link
|
||||
linkend="arenas.narenas"><mallctl>arenas.narenas</mallctl></link>.
|
||||
The proportion of unused dirty pages to be purged depends on the current
|
||||
time; see <link
|
||||
arena <i>, or for all arenas if <i> equals
|
||||
<constant>MALLCTL_ARENAS_ALL</constant>. The proportion of unused dirty
|
||||
pages to be purged depends on the current time; see <link
|
||||
linkend="opt.decay_time"><mallctl>opt.decay_time</mallctl></link> for
|
||||
details.</para></listitem>
|
||||
</varlistentry>
|
||||
@@ -1465,9 +1473,8 @@ malloc_conf = "xmalloc:true";]]></programlisting>
|
||||
</term>
|
||||
<listitem><para>Set the precedence of dss allocation as related to mmap
|
||||
allocation for arena <i>, or for all arenas if <i> equals
|
||||
<link
|
||||
linkend="arenas.narenas"><mallctl>arenas.narenas</mallctl></link>. See
|
||||
<link linkend="opt.dss"><mallctl>opt.dss</mallctl></link> for supported
|
||||
<constant>MALLCTL_ARENAS_ALL</constant>. See <link
|
||||
linkend="opt.dss"><mallctl>opt.dss</mallctl></link> for supported
|
||||
settings.</para></listitem>
|
||||
</varlistentry>
|
||||
|
||||
|
Reference in New Issue
Block a user