mirror of
https://github.com/jemalloc/jemalloc.git
synced 2026-04-14 22:51:50 +03:00
Implement the arena.<i>.reset mallctl.
This makes it possible to discard all of an arena's allocations in a single operation. This resolves #146.
This commit is contained in:
parent
66cd953514
commit
19ff2cefba
8 changed files with 411 additions and 39 deletions
|
|
@ -1558,6 +1558,23 @@ malloc_conf = "xmalloc:true";]]></programlisting>
|
|||
details.</para></listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry id="arena.i.reset">
|
||||
<term>
|
||||
<mallctl>arena.<i>.reset</mallctl>
|
||||
(<type>void</type>)
|
||||
<literal>--</literal>
|
||||
</term>
|
||||
<listitem><para>Discard all of the arena's extant allocations. This
|
||||
interface can only be used with arenas created via <link
|
||||
linkend="arenas.extend"><mallctl>arenas.extend</mallctl></link>. None
|
||||
of the arena's discarded/cached allocations may accessed afterward. As
|
||||
part of this requirement, all thread caches which were used to
|
||||
allocate/deallocate in conjunction with the arena must be flushed
|
||||
beforehand. This interface cannot be used if running inside Valgrind,
|
||||
nor if the <link linkend="opt.quarantine">quarantine</link> size is
|
||||
non-zero.</para></listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry id="arena.i.dss">
|
||||
<term>
|
||||
<mallctl>arena.<i>.dss</mallctl>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue