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:
parent
4d434adb14
commit
a2c719b374
@ -1267,7 +1267,7 @@ malloc_conf = "xmalloc:true";]]></programlisting>
|
|||||||
<varlistentry id="arena.i.purge">
|
<varlistentry id="arena.i.purge">
|
||||||
<term>
|
<term>
|
||||||
<mallctl>arena.<i>.purge</mallctl>
|
<mallctl>arena.<i>.purge</mallctl>
|
||||||
(<type>unsigned</type>)
|
(<type>void</type>)
|
||||||
<literal>--</literal>
|
<literal>--</literal>
|
||||||
</term>
|
</term>
|
||||||
<listitem><para>Purge unused dirty pages for arena <i>, or for
|
<listitem><para>Purge unused dirty pages for arena <i>, or for
|
||||||
@ -1410,16 +1410,6 @@ malloc_conf = "xmalloc:true";]]></programlisting>
|
|||||||
class.</para></listitem>
|
class.</para></listitem>
|
||||||
</varlistentry>
|
</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">
|
<varlistentry id="arenas.extend">
|
||||||
<term>
|
<term>
|
||||||
<mallctl>arenas.extend</mallctl>
|
<mallctl>arenas.extend</mallctl>
|
||||||
|
27
src/ctl.c
27
src/ctl.c
@ -129,7 +129,6 @@ CTL_PROTO(arenas_tcache_max)
|
|||||||
CTL_PROTO(arenas_nbins)
|
CTL_PROTO(arenas_nbins)
|
||||||
CTL_PROTO(arenas_nhbins)
|
CTL_PROTO(arenas_nhbins)
|
||||||
CTL_PROTO(arenas_nlruns)
|
CTL_PROTO(arenas_nlruns)
|
||||||
CTL_PROTO(arenas_purge)
|
|
||||||
CTL_PROTO(arenas_extend)
|
CTL_PROTO(arenas_extend)
|
||||||
CTL_PROTO(prof_active)
|
CTL_PROTO(prof_active)
|
||||||
CTL_PROTO(prof_dump)
|
CTL_PROTO(prof_dump)
|
||||||
@ -301,7 +300,6 @@ static const ctl_named_node_t arenas_node[] = {
|
|||||||
{NAME("bin"), CHILD(indexed, arenas_bin)},
|
{NAME("bin"), CHILD(indexed, arenas_bin)},
|
||||||
{NAME("nlruns"), CTL(arenas_nlruns)},
|
{NAME("nlruns"), CTL(arenas_nlruns)},
|
||||||
{NAME("lrun"), CHILD(indexed, arenas_lrun)},
|
{NAME("lrun"), CHILD(indexed, arenas_lrun)},
|
||||||
{NAME("purge"), CTL(arenas_purge)},
|
|
||||||
{NAME("extend"), CTL(arenas_extend)}
|
{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);
|
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
|
static int
|
||||||
arenas_extend_ctl(const size_t *mib, size_t miblen, void *oldp, size_t *oldlenp,
|
arenas_extend_ctl(const size_t *mib, size_t miblen, void *oldp, size_t *oldlenp,
|
||||||
void *newp, size_t newlen)
|
void *newp, size_t newlen)
|
||||||
|
@ -279,18 +279,6 @@ TEST_BEGIN(test_arena_i_dss)
|
|||||||
}
|
}
|
||||||
TEST_END
|
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)
|
TEST_BEGIN(test_arenas_initialized)
|
||||||
{
|
{
|
||||||
unsigned narenas;
|
unsigned narenas;
|
||||||
@ -417,7 +405,6 @@ main(void)
|
|||||||
test_thread_arena,
|
test_thread_arena,
|
||||||
test_arena_i_purge,
|
test_arena_i_purge,
|
||||||
test_arena_i_dss,
|
test_arena_i_dss,
|
||||||
test_arenas_purge,
|
|
||||||
test_arenas_initialized,
|
test_arenas_initialized,
|
||||||
test_arenas_constants,
|
test_arenas_constants,
|
||||||
test_arenas_bin_constants,
|
test_arenas_bin_constants,
|
||||||
|
Loading…
Reference in New Issue
Block a user