Remove the "arenas.purge" mallctl.

Remove the "arenas.purge" mallctl, which was obsoleted by the
"arena.<i>.purge" mallctl in 3.1.0.
This commit is contained in:
Jason Evans 2014-04-15 12:46:28 -07:00
parent 4d434adb14
commit a2c719b374
3 changed files with 1 additions and 51 deletions

View File

@ -1267,7 +1267,7 @@ malloc_conf = "xmalloc:true";]]></programlisting>
<varlistentry id="arena.i.purge">
<term>
<mallctl>arena.&lt;i&gt;.purge</mallctl>
(<type>unsigned</type>)
(<type>void</type>)
<literal>--</literal>
</term>
<listitem><para>Purge unused dirty pages for arena &lt;i&gt;, or for
@ -1410,16 +1410,6 @@ malloc_conf = "xmalloc:true";]]></programlisting>
class.</para></listitem>
</varlistentry>
<varlistentry id="arenas.purge">
<term>
<mallctl>arenas.purge</mallctl>
(<type>unsigned</type>)
<literal>-w</literal>
</term>
<listitem><para>Purge unused dirty pages for the specified arena, or
for all arenas if none is specified.</para></listitem>
</varlistentry>
<varlistentry id="arenas.extend">
<term>
<mallctl>arenas.extend</mallctl>

View File

@ -129,7 +129,6 @@ CTL_PROTO(arenas_tcache_max)
CTL_PROTO(arenas_nbins)
CTL_PROTO(arenas_nhbins)
CTL_PROTO(arenas_nlruns)
CTL_PROTO(arenas_purge)
CTL_PROTO(arenas_extend)
CTL_PROTO(prof_active)
CTL_PROTO(prof_dump)
@ -301,7 +300,6 @@ static const ctl_named_node_t arenas_node[] = {
{NAME("bin"), CHILD(indexed, arenas_bin)},
{NAME("nlruns"), CTL(arenas_nlruns)},
{NAME("lrun"), CHILD(indexed, arenas_lrun)},
{NAME("purge"), CTL(arenas_purge)},
{NAME("extend"), CTL(arenas_extend)}
};
@ -1468,31 +1466,6 @@ arenas_lrun_i_index(const size_t *mib, size_t miblen, size_t i)
return (super_arenas_lrun_i_node);
}
static int
arenas_purge_ctl(const size_t *mib, size_t miblen, void *oldp, size_t *oldlenp,
void *newp, size_t newlen)
{
int ret;
unsigned arena_ind;
malloc_mutex_lock(&ctl_mtx);
WRITEONLY();
arena_ind = UINT_MAX;
WRITE(arena_ind, unsigned);
if (newp != NULL && arena_ind >= ctl_stats.narenas)
ret = EFAULT;
else {
if (arena_ind == UINT_MAX)
arena_ind = ctl_stats.narenas;
arena_purge(arena_ind);
ret = 0;
}
label_return:
malloc_mutex_unlock(&ctl_mtx);
return (ret);
}
static int
arenas_extend_ctl(const size_t *mib, size_t miblen, void *oldp, size_t *oldlenp,
void *newp, size_t newlen)

View File

@ -279,18 +279,6 @@ TEST_BEGIN(test_arena_i_dss)
}
TEST_END
TEST_BEGIN(test_arenas_purge)
{
unsigned arena = 0;
assert_d_eq(mallctl("arenas.purge", NULL, NULL, &arena, sizeof(arena)),
0, "Unexpected mallctl() failure");
assert_d_eq(mallctl("arenas.purge", NULL, NULL, NULL, 0), 0,
"Unexpected mallctl() failure");
}
TEST_END
TEST_BEGIN(test_arenas_initialized)
{
unsigned narenas;
@ -417,7 +405,6 @@ main(void)
test_thread_arena,
test_arena_i_purge,
test_arena_i_dss,
test_arenas_purge,
test_arenas_initialized,
test_arenas_constants,
test_arenas_bin_constants,