Blame jemalloc/doc/jemalloc.xml.in

Packit 345191
Packit 345191
Packit 345191
        href="http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl"?>
Packit 345191
Packit 345191
        "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
Packit 345191
]>
Packit 345191
Packit 345191
<refentry>
Packit 345191
  <refentryinfo>
Packit 345191
    <title>User Manual</title>
Packit 345191
    <productname>jemalloc</productname>
Packit 345191
    <releaseinfo role="version">@jemalloc_version@</releaseinfo>
Packit 345191
    <authorgroup>
Packit 345191
      <author>
Packit 345191
        <firstname>Jason</firstname>
Packit 345191
        <surname>Evans</surname>
Packit 345191
        <personblurb>Author</personblurb>
Packit 345191
      </author>
Packit 345191
    </authorgroup>
Packit 345191
  </refentryinfo>
Packit 345191
  <refmeta>
Packit 345191
    <refentrytitle>JEMALLOC</refentrytitle>
Packit 345191
    <manvolnum>3</manvolnum>
Packit 345191
  </refmeta>
Packit 345191
  <refnamediv>
Packit 345191
    <refdescriptor>jemalloc</refdescriptor>
Packit 345191
    <refname>jemalloc</refname>
Packit 345191
    
Packit 345191
         the system malloc(3) implementation would these files be appropriate.
Packit 345191
    <refname>malloc</refname>
Packit 345191
    <refname>calloc</refname>
Packit 345191
    <refname>posix_memalign</refname>
Packit 345191
    <refname>aligned_alloc</refname>
Packit 345191
    <refname>realloc</refname>
Packit 345191
    <refname>free</refname>
Packit 345191
    <refname>mallocx</refname>
Packit 345191
    <refname>rallocx</refname>
Packit 345191
    <refname>xallocx</refname>
Packit 345191
    <refname>sallocx</refname>
Packit 345191
    <refname>dallocx</refname>
Packit 345191
    <refname>sdallocx</refname>
Packit 345191
    <refname>nallocx</refname>
Packit 345191
    <refname>mallctl</refname>
Packit 345191
    <refname>mallctlnametomib</refname>
Packit 345191
    <refname>mallctlbymib</refname>
Packit 345191
    <refname>malloc_stats_print</refname>
Packit 345191
    <refname>malloc_usable_size</refname>
Packit 345191
    -->
Packit 345191
    <refpurpose>general purpose memory allocation functions</refpurpose>
Packit 345191
  </refnamediv>
Packit 345191
  <refsect1 id="library">
Packit 345191
    <title>LIBRARY</title>
Packit 345191
    <para>This manual describes jemalloc @jemalloc_version@.  More information
Packit 345191
    can be found at the 
Packit 345191
    url="http://jemalloc.net/">jemalloc website</ulink>.</para>
Packit 345191
  </refsect1>
Packit 345191
  <refsynopsisdiv>
Packit 345191
    <title>SYNOPSIS</title>
Packit 345191
    <funcsynopsis>
Packit 345191
      <funcsynopsisinfo>#include <<filename class="headerfile">jemalloc/jemalloc.h</filename>></funcsynopsisinfo>
Packit 345191
      <refsect2>
Packit 345191
        <title>Standard API</title>
Packit 345191
        <funcprototype>
Packit 345191
          <funcdef>void *<function>malloc</function></funcdef>
Packit 345191
          <paramdef>size_t <parameter>size</parameter></paramdef>
Packit 345191
        </funcprototype>
Packit 345191
        <funcprototype>
Packit 345191
          <funcdef>void *<function>calloc</function></funcdef>
Packit 345191
          <paramdef>size_t <parameter>number</parameter></paramdef>
Packit 345191
          <paramdef>size_t <parameter>size</parameter></paramdef>
Packit 345191
        </funcprototype>
Packit 345191
        <funcprototype>
Packit 345191
          <funcdef>int <function>posix_memalign</function></funcdef>
Packit 345191
          <paramdef>void **<parameter>ptr</parameter></paramdef>
Packit 345191
          <paramdef>size_t <parameter>alignment</parameter></paramdef>
Packit 345191
          <paramdef>size_t <parameter>size</parameter></paramdef>
Packit 345191
        </funcprototype>
Packit 345191
        <funcprototype>
Packit 345191
          <funcdef>void *<function>aligned_alloc</function></funcdef>
Packit 345191
          <paramdef>size_t <parameter>alignment</parameter></paramdef>
Packit 345191
          <paramdef>size_t <parameter>size</parameter></paramdef>
Packit 345191
        </funcprototype>
Packit 345191
        <funcprototype>
Packit 345191
          <funcdef>void *<function>realloc</function></funcdef>
Packit 345191
          <paramdef>void *<parameter>ptr</parameter></paramdef>
Packit 345191
          <paramdef>size_t <parameter>size</parameter></paramdef>
Packit 345191
        </funcprototype>
Packit 345191
        <funcprototype>
Packit 345191
          <funcdef>void <function>free</function></funcdef>
Packit 345191
          <paramdef>void *<parameter>ptr</parameter></paramdef>
Packit 345191
        </funcprototype>
Packit 345191
      </refsect2>
Packit 345191
      <refsect2>
Packit 345191
        <title>Non-standard API</title>
Packit 345191
        <funcprototype>
Packit 345191
          <funcdef>void *<function>mallocx</function></funcdef>
Packit 345191
          <paramdef>size_t <parameter>size</parameter></paramdef>
Packit 345191
          <paramdef>int <parameter>flags</parameter></paramdef>
Packit 345191
        </funcprototype>
Packit 345191
        <funcprototype>
Packit 345191
          <funcdef>void *<function>rallocx</function></funcdef>
Packit 345191
          <paramdef>void *<parameter>ptr</parameter></paramdef>
Packit 345191
          <paramdef>size_t <parameter>size</parameter></paramdef>
Packit 345191
          <paramdef>int <parameter>flags</parameter></paramdef>
Packit 345191
        </funcprototype>
Packit 345191
        <funcprototype>
Packit 345191
          <funcdef>size_t <function>xallocx</function></funcdef>
Packit 345191
          <paramdef>void *<parameter>ptr</parameter></paramdef>
Packit 345191
          <paramdef>size_t <parameter>size</parameter></paramdef>
Packit 345191
          <paramdef>size_t <parameter>extra</parameter></paramdef>
Packit 345191
          <paramdef>int <parameter>flags</parameter></paramdef>
Packit 345191
        </funcprototype>
Packit 345191
        <funcprototype>
Packit 345191
          <funcdef>size_t <function>sallocx</function></funcdef>
Packit 345191
          <paramdef>void *<parameter>ptr</parameter></paramdef>
Packit 345191
          <paramdef>int <parameter>flags</parameter></paramdef>
Packit 345191
        </funcprototype>
Packit 345191
        <funcprototype>
Packit 345191
          <funcdef>void <function>dallocx</function></funcdef>
Packit 345191
          <paramdef>void *<parameter>ptr</parameter></paramdef>
Packit 345191
          <paramdef>int <parameter>flags</parameter></paramdef>
Packit 345191
        </funcprototype>
Packit 345191
        <funcprototype>
Packit 345191
          <funcdef>void <function>sdallocx</function></funcdef>
Packit 345191
          <paramdef>void *<parameter>ptr</parameter></paramdef>
Packit 345191
          <paramdef>size_t <parameter>size</parameter></paramdef>
Packit 345191
          <paramdef>int <parameter>flags</parameter></paramdef>
Packit 345191
        </funcprototype>
Packit 345191
        <funcprototype>
Packit 345191
          <funcdef>size_t <function>nallocx</function></funcdef>
Packit 345191
          <paramdef>size_t <parameter>size</parameter></paramdef>
Packit 345191
          <paramdef>int <parameter>flags</parameter></paramdef>
Packit 345191
        </funcprototype>
Packit 345191
        <funcprototype>
Packit 345191
          <funcdef>int <function>mallctl</function></funcdef>
Packit 345191
          <paramdef>const char *<parameter>name</parameter></paramdef>
Packit 345191
          <paramdef>void *<parameter>oldp</parameter></paramdef>
Packit 345191
          <paramdef>size_t *<parameter>oldlenp</parameter></paramdef>
Packit 345191
          <paramdef>void *<parameter>newp</parameter></paramdef>
Packit 345191
          <paramdef>size_t <parameter>newlen</parameter></paramdef>
Packit 345191
        </funcprototype>
Packit 345191
        <funcprototype>
Packit 345191
          <funcdef>int <function>mallctlnametomib</function></funcdef>
Packit 345191
          <paramdef>const char *<parameter>name</parameter></paramdef>
Packit 345191
          <paramdef>size_t *<parameter>mibp</parameter></paramdef>
Packit 345191
          <paramdef>size_t *<parameter>miblenp</parameter></paramdef>
Packit 345191
        </funcprototype>
Packit 345191
        <funcprototype>
Packit 345191
          <funcdef>int <function>mallctlbymib</function></funcdef>
Packit 345191
          <paramdef>const size_t *<parameter>mib</parameter></paramdef>
Packit 345191
          <paramdef>size_t <parameter>miblen</parameter></paramdef>
Packit 345191
          <paramdef>void *<parameter>oldp</parameter></paramdef>
Packit 345191
          <paramdef>size_t *<parameter>oldlenp</parameter></paramdef>
Packit 345191
          <paramdef>void *<parameter>newp</parameter></paramdef>
Packit 345191
          <paramdef>size_t <parameter>newlen</parameter></paramdef>
Packit 345191
        </funcprototype>
Packit 345191
        <funcprototype>
Packit 345191
          <funcdef>void <function>malloc_stats_print</function></funcdef>
Packit 345191
          <paramdef>void <parameter>(*write_cb)</parameter>
Packit 345191
            <funcparams>void *, const char *</funcparams>
Packit 345191
          </paramdef>
Packit 345191
          <paramdef>void *<parameter>cbopaque</parameter></paramdef>
Packit 345191
          <paramdef>const char *<parameter>opts</parameter></paramdef>
Packit 345191
        </funcprototype>
Packit 345191
        <funcprototype>
Packit 345191
          <funcdef>size_t <function>malloc_usable_size</function></funcdef>
Packit 345191
          <paramdef>const void *<parameter>ptr</parameter></paramdef>
Packit 345191
        </funcprototype>
Packit 345191
        <funcprototype>
Packit 345191
          <funcdef>void <function>(*malloc_message)</function></funcdef>
Packit 345191
          <paramdef>void *<parameter>cbopaque</parameter></paramdef>
Packit 345191
          <paramdef>const char *<parameter>s</parameter></paramdef>
Packit 345191
        </funcprototype>
Packit 345191
        <para><type>const char *</type><varname>malloc_conf</varname>;</para>
Packit 345191
      </refsect2>
Packit 345191
    </funcsynopsis>
Packit 345191
  </refsynopsisdiv>
Packit 345191
  <refsect1 id="description">
Packit 345191
    <title>DESCRIPTION</title>
Packit 345191
    <refsect2>
Packit 345191
      <title>Standard API</title>
Packit 345191
Packit 345191
      <para>The <function>malloc()</function> function allocates
Packit 345191
      <parameter>size</parameter> bytes of uninitialized memory.  The allocated
Packit 345191
      space is suitably aligned (after possible pointer coercion) for storage
Packit 345191
      of any type of object.</para>
Packit 345191
Packit 345191
      <para>The <function>calloc()</function> function allocates
Packit 345191
      space for <parameter>number</parameter> objects, each
Packit 345191
      <parameter>size</parameter> bytes in length.  The result is identical to
Packit 345191
      calling <function>malloc()</function> with an argument of
Packit 345191
      <parameter>number</parameter> * <parameter>size</parameter>, with the
Packit 345191
      exception that the allocated memory is explicitly initialized to zero
Packit 345191
      bytes.</para>
Packit 345191
Packit 345191
      <para>The <function>posix_memalign()</function> function
Packit 345191
      allocates <parameter>size</parameter> bytes of memory such that the
Packit 345191
      allocation's base address is a multiple of
Packit 345191
      <parameter>alignment</parameter>, and returns the allocation in the value
Packit 345191
      pointed to by <parameter>ptr</parameter>.  The requested
Packit 345191
      <parameter>alignment</parameter> must be a power of 2 at least as large as
Packit 345191
      sizeof(<type>void *</type>).</para>
Packit 345191
Packit 345191
      <para>The <function>aligned_alloc()</function> function
Packit 345191
      allocates <parameter>size</parameter> bytes of memory such that the
Packit 345191
      allocation's base address is a multiple of
Packit 345191
      <parameter>alignment</parameter>.  The requested
Packit 345191
      <parameter>alignment</parameter> must be a power of 2.  Behavior is
Packit 345191
      undefined if <parameter>size</parameter> is not an integral multiple of
Packit 345191
      <parameter>alignment</parameter>.</para>
Packit 345191
Packit 345191
      <para>The <function>realloc()</function> function changes the
Packit 345191
      size of the previously allocated memory referenced by
Packit 345191
      <parameter>ptr</parameter> to <parameter>size</parameter> bytes.  The
Packit 345191
      contents of the memory are unchanged up to the lesser of the new and old
Packit 345191
      sizes.  If the new size is larger, the contents of the newly allocated
Packit 345191
      portion of the memory are undefined.  Upon success, the memory referenced
Packit 345191
      by <parameter>ptr</parameter> is freed and a pointer to the newly
Packit 345191
      allocated memory is returned.  Note that
Packit 345191
      <function>realloc()</function> may move the memory allocation,
Packit 345191
      resulting in a different return value than <parameter>ptr</parameter>.
Packit 345191
      If <parameter>ptr</parameter> is <constant>NULL</constant>, the
Packit 345191
      <function>realloc()</function> function behaves identically to
Packit 345191
      <function>malloc()</function> for the specified size.</para>
Packit 345191
Packit 345191
      <para>The <function>free()</function> function causes the
Packit 345191
      allocated memory referenced by <parameter>ptr</parameter> to be made
Packit 345191
      available for future allocations.  If <parameter>ptr</parameter> is
Packit 345191
      <constant>NULL</constant>, no action occurs.</para>
Packit 345191
    </refsect2>
Packit 345191
    <refsect2>
Packit 345191
      <title>Non-standard API</title>
Packit 345191
      <para>The <function>mallocx()</function>,
Packit 345191
      <function>rallocx()</function>,
Packit 345191
      <function>xallocx()</function>,
Packit 345191
      <function>sallocx()</function>,
Packit 345191
      <function>dallocx()</function>,
Packit 345191
      <function>sdallocx()</function>, and
Packit 345191
      <function>nallocx()</function> functions all have a
Packit 345191
      <parameter>flags</parameter> argument that can be used to specify
Packit 345191
      options.  The functions only check the options that are contextually
Packit 345191
      relevant.  Use bitwise or (|) operations to
Packit 345191
      specify one or more of the following:
Packit 345191
        <variablelist>
Packit 345191
          <varlistentry id="MALLOCX_LG_ALIGN">
Packit 345191
            <term><constant>MALLOCX_LG_ALIGN(<parameter>la</parameter>)
Packit 345191
            </constant></term>
Packit 345191
Packit 345191
            <listitem><para>Align the memory allocation to start at an address
Packit 345191
            that is a multiple of (1 <<
Packit 345191
            <parameter>la</parameter>).  This macro does not validate
Packit 345191
            that <parameter>la</parameter> is within the valid
Packit 345191
            range.</para></listitem>
Packit 345191
          </varlistentry>
Packit 345191
          <varlistentry id="MALLOCX_ALIGN">
Packit 345191
            <term><constant>MALLOCX_ALIGN(<parameter>a</parameter>)
Packit 345191
            </constant></term>
Packit 345191
Packit 345191
            <listitem><para>Align the memory allocation to start at an address
Packit 345191
            that is a multiple of <parameter>a</parameter>, where
Packit 345191
            <parameter>a</parameter> is a power of two.  This macro does not
Packit 345191
            validate that <parameter>a</parameter> is a power of 2.
Packit 345191
            </para></listitem>
Packit 345191
          </varlistentry>
Packit 345191
          <varlistentry id="MALLOCX_ZERO">
Packit 345191
            <term><constant>MALLOCX_ZERO</constant></term>
Packit 345191
Packit 345191
            <listitem><para>Initialize newly allocated memory to contain zero
Packit 345191
            bytes.  In the growing reallocation case, the real size prior to
Packit 345191
            reallocation defines the boundary between untouched bytes and those
Packit 345191
            that are initialized to contain zero bytes.  If this macro is
Packit 345191
            absent, newly allocated memory is uninitialized.</para></listitem>
Packit 345191
          </varlistentry>
Packit 345191
          <varlistentry id="MALLOCX_TCACHE">
Packit 345191
            <term><constant>MALLOCX_TCACHE(<parameter>tc</parameter>)
Packit 345191
            </constant></term>
Packit 345191
Packit 345191
            <listitem><para>Use the thread-specific cache (tcache) specified by
Packit 345191
            the identifier <parameter>tc</parameter>, which must have been
Packit 345191
            acquired via the 
Packit 345191
            linkend="tcache.create"><mallctl>tcache.create</mallctl></link>
Packit 345191
            mallctl.  This macro does not validate that
Packit 345191
            <parameter>tc</parameter> specifies a valid
Packit 345191
            identifier.</para></listitem>
Packit 345191
          </varlistentry>
Packit 345191
          <varlistentry id="MALLOC_TCACHE_NONE">
Packit 345191
            <term><constant>MALLOCX_TCACHE_NONE</constant></term>
Packit 345191
Packit 345191
            <listitem><para>Do not use a thread-specific cache (tcache).  Unless
Packit 345191
            <constant>MALLOCX_TCACHE(<parameter>tc</parameter>)</constant> or
Packit 345191
            <constant>MALLOCX_TCACHE_NONE</constant> is specified, an
Packit 345191
            automatically managed tcache will be used under many circumstances.
Packit 345191
            This macro cannot be used in the same <parameter>flags</parameter>
Packit 345191
            argument as
Packit 345191
            <constant>MALLOCX_TCACHE(<parameter>tc</parameter>)</constant>.</para></listitem>
Packit 345191
          </varlistentry>
Packit 345191
          <varlistentry id="MALLOCX_ARENA">
Packit 345191
            <term><constant>MALLOCX_ARENA(<parameter>a</parameter>)
Packit 345191
            </constant></term>
Packit 345191
Packit 345191
            <listitem><para>Use the arena specified by the index
Packit 345191
            <parameter>a</parameter>.  This macro has no effect for regions that
Packit 345191
            were allocated via an arena other than the one specified.  This
Packit 345191
            macro does not validate that <parameter>a</parameter> specifies an
Packit 345191
            arena index in the valid range.</para></listitem>
Packit 345191
          </varlistentry>
Packit 345191
        </variablelist>
Packit 345191
      </para>
Packit 345191
Packit 345191
      <para>The <function>mallocx()</function> function allocates at
Packit 345191
      least <parameter>size</parameter> bytes of memory, and returns a pointer
Packit 345191
      to the base address of the allocation.  Behavior is undefined if
Packit 345191
      <parameter>size</parameter> is <constant>0</constant>.</para>
Packit 345191
Packit 345191
      <para>The <function>rallocx()</function> function resizes the
Packit 345191
      allocation at <parameter>ptr</parameter> to be at least
Packit 345191
      <parameter>size</parameter> bytes, and returns a pointer to the base
Packit 345191
      address of the resulting allocation, which may or may not have moved from
Packit 345191
      its original location.  Behavior is undefined if
Packit 345191
      <parameter>size</parameter> is <constant>0</constant>.</para>
Packit 345191
Packit 345191
      <para>The <function>xallocx()</function> function resizes the
Packit 345191
      allocation at <parameter>ptr</parameter> in place to be at least
Packit 345191
      <parameter>size</parameter> bytes, and returns the real size of the
Packit 345191
      allocation.  If <parameter>extra</parameter> is non-zero, an attempt is
Packit 345191
      made to resize the allocation to be at least 
Packit 345191
      language="C">(<parameter>size</parameter> +
Packit 345191
      <parameter>extra</parameter>) bytes, though inability to allocate
Packit 345191
      the extra byte(s) will not by itself result in failure to resize.
Packit 345191
      Behavior is undefined if <parameter>size</parameter> is
Packit 345191
      <constant>0</constant>, or if 
Packit 345191
      language="C">(<parameter>size</parameter> + <parameter>extra</parameter>
Packit 345191
      > <constant>SIZE_T_MAX</constant>).</para>
Packit 345191
Packit 345191
      <para>The <function>sallocx()</function> function returns the
Packit 345191
      real size of the allocation at <parameter>ptr</parameter>.</para>
Packit 345191
Packit 345191
      <para>The <function>dallocx()</function> function causes the
Packit 345191
      memory referenced by <parameter>ptr</parameter> to be made available for
Packit 345191
      future allocations.</para>
Packit 345191
Packit 345191
      <para>The <function>sdallocx()</function> function is an
Packit 345191
      extension of <function>dallocx()</function> with a
Packit 345191
      <parameter>size</parameter> parameter to allow the caller to pass in the
Packit 345191
      allocation size as an optimization.  The minimum valid input size is the
Packit 345191
      original requested size of the allocation, and the maximum valid input
Packit 345191
      size is the corresponding value returned by
Packit 345191
      <function>nallocx()</function> or
Packit 345191
      <function>sallocx()</function>.</para>
Packit 345191
Packit 345191
      <para>The <function>nallocx()</function> function allocates no
Packit 345191
      memory, but it performs the same size computation as the
Packit 345191
      <function>mallocx()</function> function, and returns the real
Packit 345191
      size of the allocation that would result from the equivalent
Packit 345191
      <function>mallocx()</function> function call, or
Packit 345191
      <constant>0</constant> if the inputs exceed the maximum supported size
Packit 345191
      class and/or alignment.  Behavior is undefined if
Packit 345191
      <parameter>size</parameter> is <constant>0</constant>.</para>
Packit 345191
Packit 345191
      <para>The <function>mallctl()</function> function provides a
Packit 345191
      general interface for introspecting the memory allocator, as well as
Packit 345191
      setting modifiable parameters and triggering actions.  The
Packit 345191
      period-separated <parameter>name</parameter> argument specifies a
Packit 345191
      location in a tree-structured namespace; see the 
Packit 345191
      linkend="mallctl_namespace" xrefstyle="template:%t"/> section for
Packit 345191
      documentation on the tree contents.  To read a value, pass a pointer via
Packit 345191
      <parameter>oldp</parameter> to adequate space to contain the value, and a
Packit 345191
      pointer to its length via <parameter>oldlenp</parameter>; otherwise pass
Packit 345191
      <constant>NULL</constant> and <constant>NULL</constant>.  Similarly, to
Packit 345191
      write a value, pass a pointer to the value via
Packit 345191
      <parameter>newp</parameter>, and its length via
Packit 345191
      <parameter>newlen</parameter>; otherwise pass <constant>NULL</constant>
Packit 345191
      and <constant>0</constant>.</para>
Packit 345191
Packit 345191
      <para>The <function>mallctlnametomib()</function> function
Packit 345191
      provides a way to avoid repeated name lookups for applications that
Packit 345191
      repeatedly query the same portion of the namespace, by translating a name
Packit 345191
      to a <quote>Management Information Base</quote> (MIB) that can be passed
Packit 345191
      repeatedly to <function>mallctlbymib()</function>.  Upon
Packit 345191
      successful return from <function>mallctlnametomib()</function>,
Packit 345191
      <parameter>mibp</parameter> contains an array of
Packit 345191
      <parameter>*miblenp</parameter> integers, where
Packit 345191
      <parameter>*miblenp</parameter> is the lesser of the number of components
Packit 345191
      in <parameter>name</parameter> and the input value of
Packit 345191
      <parameter>*miblenp</parameter>.  Thus it is possible to pass a
Packit 345191
      <parameter>*miblenp</parameter> that is smaller than the number of
Packit 345191
      period-separated name components, which results in a partial MIB that can
Packit 345191
      be used as the basis for constructing a complete MIB.  For name
Packit 345191
      components that are integers (e.g. the 2 in
Packit 345191
      
Packit 345191
      linkend="arenas.bin.i.size"><mallctl>arenas.bin.2.size</mallctl></link>),
Packit 345191
      the corresponding MIB component will always be that integer.  Therefore,
Packit 345191
      it is legitimate to construct code like the following: 
Packit 345191
      language="C">
Packit 345191
unsigned nbins, i;
Packit 345191
size_t mib[4];
Packit 345191
size_t len, miblen;
Packit 345191
Packit 345191
len = sizeof(nbins);
Packit 345191
mallctl("arenas.nbins", &nbins, &len, NULL, 0);
Packit 345191
Packit 345191
miblen = 4;
Packit 345191
mallctlnametomib("arenas.bin.0.size", mib, &miblen);
Packit 345191
for (i = 0; i < nbins; i++) {
Packit 345191
	size_t bin_size;
Packit 345191
Packit 345191
	mib[2] = i;
Packit 345191
	len = sizeof(bin_size);
Packit 345191
	mallctlbymib(mib, miblen, (void *)&bin_size, &len, NULL, 0);
Packit 345191
	/* Do something with bin_size... */
Packit 345191
}]]></programlisting></para>
Packit 345191
Packit 345191
      <varlistentry id="malloc_stats_print_opts">
Packit 345191
      </varlistentry>
Packit 345191
      <para>The <function>malloc_stats_print()</function> function writes
Packit 345191
      summary statistics via the <parameter>write_cb</parameter> callback
Packit 345191
      function pointer and <parameter>cbopaque</parameter> data passed to
Packit 345191
      <parameter>write_cb</parameter>, or <function>malloc_message()</function>
Packit 345191
      if <parameter>write_cb</parameter> is <constant>NULL</constant>.  The
Packit 345191
      statistics are presented in human-readable form unless <quote>J</quote> is
Packit 345191
      specified as a character within the <parameter>opts</parameter> string, in
Packit 345191
      which case the statistics are presented in 
Packit 345191
      url="http://www.json.org/">JSON format</ulink>.  This function can be
Packit 345191
      called repeatedly.  General information that never changes during
Packit 345191
      execution can be omitted by specifying <quote>g</quote> as a character
Packit 345191
      within the <parameter>opts</parameter> string.  Note that
Packit 345191
      <function>malloc_stats_print()</function> uses the
Packit 345191
      <function>mallctl*()</function> functions internally, so inconsistent
Packit 345191
      statistics can be reported if multiple threads use these functions
Packit 345191
      simultaneously.  If <option>--enable-stats</option> is specified during
Packit 345191
      configuration, <quote>m</quote>, <quote>d</quote>, and <quote>a</quote>
Packit 345191
      can be specified to omit merged arena, destroyed merged arena, and per
Packit 345191
      arena statistics, respectively; <quote>b</quote> and <quote>l</quote> can
Packit 345191
      be specified to omit per size class statistics for bins and large objects,
Packit 345191
      respectively; <quote>x</quote> can be specified to omit all mutex
Packit 345191
      statistics; <quote>e</quote> can be used to omit extent statistics.
Packit 345191
      Unrecognized characters are silently ignored.  Note that thread caching
Packit 345191
      may prevent some statistics from being completely up to date, since extra
Packit 345191
      locking would be required to merge counters that track thread cache
Packit 345191
      operations.</para>
Packit 345191
Packit 345191
      <para>The <function>malloc_usable_size()</function> function
Packit 345191
      returns the usable size of the allocation pointed to by
Packit 345191
      <parameter>ptr</parameter>.  The return value may be larger than the size
Packit 345191
      that was requested during allocation.  The
Packit 345191
      <function>malloc_usable_size()</function> function is not a
Packit 345191
      mechanism for in-place <function>realloc()</function>; rather
Packit 345191
      it is provided solely as a tool for introspection purposes.  Any
Packit 345191
      discrepancy between the requested allocation size and the size reported
Packit 345191
      by <function>malloc_usable_size()</function> should not be
Packit 345191
      depended on, since such behavior is entirely implementation-dependent.
Packit 345191
      </para>
Packit 345191
    </refsect2>
Packit 345191
  </refsect1>
Packit 345191
  <refsect1 id="tuning">
Packit 345191
    <title>TUNING</title>
Packit 345191
    <para>Once, when the first call is made to one of the memory allocation
Packit 345191
    routines, the allocator initializes its internals based in part on various
Packit 345191
    options that can be specified at compile- or run-time.</para>
Packit 345191
Packit 345191
    <para>The string specified via <option>--with-malloc-conf</option>, the
Packit 345191
    string pointed to by the global variable <varname>malloc_conf</varname>, the
Packit 345191
    <quote>name</quote> of the file referenced by the symbolic link named
Packit 345191
    <filename class="symlink">/etc/malloc.conf</filename>, and the value of the
Packit 345191
    environment variable <envar>MALLOC_CONF</envar>, will be interpreted, in
Packit 345191
    that order, from left to right as options.  Note that
Packit 345191
    <varname>malloc_conf</varname> may be read before
Packit 345191
    <function>main()</function> is entered, so the declaration of
Packit 345191
    <varname>malloc_conf</varname> should specify an initializer that contains
Packit 345191
    the final value to be read by jemalloc.  <option>--with-malloc-conf</option>
Packit 345191
    and <varname>malloc_conf</varname> are compile-time mechanisms, whereas
Packit 345191
    <filename class="symlink">/etc/malloc.conf</filename> and
Packit 345191
    <envar>MALLOC_CONF</envar> can be safely set any time prior to program
Packit 345191
    invocation.</para>
Packit 345191
Packit 345191
    <para>An options string is a comma-separated list of option:value pairs.
Packit 345191
    There is one key corresponding to each 
Packit 345191
    linkend="opt.abort"><mallctl>opt.*</mallctl></link> mallctl (see the 
Packit 345191
    linkend="mallctl_namespace" xrefstyle="template:%t"/> section for options
Packit 345191
    documentation).  For example, <literal>abort:true,narenas:1</literal> sets
Packit 345191
    the <link linkend="opt.abort"><mallctl>opt.abort</mallctl></link> and 
Packit 345191
    linkend="opt.narenas"><mallctl>opt.narenas</mallctl></link> options.  Some
Packit 345191
    options have boolean values (true/false), others have integer values (base
Packit 345191
    8, 10, or 16, depending on prefix), and yet others have raw string
Packit 345191
    values.</para>
Packit 345191
  </refsect1>
Packit 345191
  <refsect1 id="implementation_notes">
Packit 345191
    <title>IMPLEMENTATION NOTES</title>
Packit 345191
    <para>Traditionally, allocators have used
Packit 345191
    <citerefentry><refentrytitle>sbrk</refentrytitle>
Packit 345191
    <manvolnum>2</manvolnum></citerefentry> to obtain memory, which is
Packit 345191
    suboptimal for several reasons, including race conditions, increased
Packit 345191
    fragmentation, and artificial limitations on maximum usable memory.  If
Packit 345191
    <citerefentry><refentrytitle>sbrk</refentrytitle>
Packit 345191
    <manvolnum>2</manvolnum></citerefentry> is supported by the operating
Packit 345191
    system, this allocator uses both
Packit 345191
    <citerefentry><refentrytitle>mmap</refentrytitle>
Packit 345191
    <manvolnum>2</manvolnum></citerefentry> and
Packit 345191
    <citerefentry><refentrytitle>sbrk</refentrytitle>
Packit 345191
    <manvolnum>2</manvolnum></citerefentry>, in that order of preference;
Packit 345191
    otherwise only <citerefentry><refentrytitle>mmap</refentrytitle>
Packit 345191
    <manvolnum>2</manvolnum></citerefentry> is used.</para>
Packit 345191
Packit 345191
    <para>This allocator uses multiple arenas in order to reduce lock
Packit 345191
    contention for threaded programs on multi-processor systems.  This works
Packit 345191
    well with regard to threading scalability, but incurs some costs.  There is
Packit 345191
    a small fixed per-arena overhead, and additionally, arenas manage memory
Packit 345191
    completely independently of each other, which means a small fixed increase
Packit 345191
    in overall memory fragmentation.  These overheads are not generally an
Packit 345191
    issue, given the number of arenas normally used.  Note that using
Packit 345191
    substantially more arenas than the default is not likely to improve
Packit 345191
    performance, mainly due to reduced cache performance.  However, it may make
Packit 345191
    sense to reduce the number of arenas if an application does not make much
Packit 345191
    use of the allocation functions.</para>
Packit 345191
Packit 345191
    <para>In addition to multiple arenas, this allocator supports
Packit 345191
    thread-specific caching, in order to make it possible to completely avoid
Packit 345191
    synchronization for most allocation requests.  Such caching allows very fast
Packit 345191
    allocation in the common case, but it increases memory usage and
Packit 345191
    fragmentation, since a bounded number of objects can remain allocated in
Packit 345191
    each thread cache.</para>
Packit 345191
Packit 345191
    <para>Memory is conceptually broken into extents.  Extents are always
Packit 345191
    aligned to multiples of the page size.  This alignment makes it possible to
Packit 345191
    find metadata for user objects quickly.  User objects are broken into two
Packit 345191
    categories according to size: small and large.  Contiguous small objects
Packit 345191
    comprise a slab, which resides within a single extent, whereas large objects
Packit 345191
    each have their own extents backing them.</para>
Packit 345191
Packit 345191
    <para>Small objects are managed in groups by slabs.  Each slab maintains
Packit 345191
    a bitmap to track which regions are in use.  Allocation requests that are no
Packit 345191
    more than half the quantum (8 or 16, depending on architecture) are rounded
Packit 345191
    up to the nearest power of two that is at least 
Packit 345191
    language="C">sizeof(<type>double</type>).  All other object size
Packit 345191
    classes are multiples of the quantum, spaced such that there are four size
Packit 345191
    classes for each doubling in size, which limits internal fragmentation to
Packit 345191
    approximately 20% for all but the smallest size classes.  Small size classes
Packit 345191
    are smaller than four times the page size, and large size classes extend
Packit 345191
    from four times the page size up to the largest size class that does not
Packit 345191
    exceed <constant>PTRDIFF_MAX</constant>.</para>
Packit 345191
Packit 345191
    <para>Allocations are packed tightly together, which can be an issue for
Packit 345191
    multi-threaded applications.  If you need to assure that allocations do not
Packit 345191
    suffer from cacheline sharing, round your allocation requests up to the
Packit 345191
    nearest multiple of the cacheline size, or specify cacheline alignment when
Packit 345191
    allocating.</para>
Packit 345191
Packit 345191
    <para>The <function>realloc()</function>,
Packit 345191
    <function>rallocx()</function>, and
Packit 345191
    <function>xallocx()</function> functions may resize allocations
Packit 345191
    without moving them under limited circumstances.  Unlike the
Packit 345191
    <function>*allocx()</function> API, the standard API does not
Packit 345191
    officially round up the usable size of an allocation to the nearest size
Packit 345191
    class, so technically it is necessary to call
Packit 345191
    <function>realloc()</function> to grow e.g. a 9-byte allocation to
Packit 345191
    16 bytes, or shrink a 16-byte allocation to 9 bytes.  Growth and shrinkage
Packit 345191
    trivially succeeds in place as long as the pre-size and post-size both round
Packit 345191
    up to the same size class.  No other API guarantees are made regarding
Packit 345191
    in-place resizing, but the current implementation also tries to resize large
Packit 345191
    allocations in place, as long as the pre-size and post-size are both large.
Packit 345191
    For shrinkage to succeed, the extent allocator must support splitting (see
Packit 345191
    
Packit 345191
    linkend="arena.i.extent_hooks"><mallctl>arena.<i>.extent_hooks</mallctl></link>).
Packit 345191
    Growth only succeeds if the trailing memory is currently available, and the
Packit 345191
    extent allocator supports merging.</para>
Packit 345191
Packit 345191
    <para>Assuming 4 KiB pages and a 16-byte quantum on a 64-bit system, the
Packit 345191
    size classes in each category are as shown in 
Packit 345191
    xrefstyle="template:Table %n"/>.</para>
Packit 345191
Packit 345191
    
Packit 345191
      <title>Size classes</title>
Packit 345191
      <tgroup cols="3" colsep="1" rowsep="1">
Packit 345191
      <colspec colname="c1" align="left"/>
Packit 345191
      <colspec colname="c2" align="right"/>
Packit 345191
      <colspec colname="c3" align="left"/>
Packit 345191
      
Packit 345191
        <row>
Packit 345191
          <entry>Category</entry>
Packit 345191
          <entry>Spacing</entry>
Packit 345191
          <entry>Size</entry>
Packit 345191
        </row>
Packit 345191
      
Packit 345191
      
Packit 345191
        <row>
Packit 345191
          <entry morerows="8">Small</entry>
Packit 345191
          <entry>lg</entry>
Packit 345191
          <entry>[8]</entry>
Packit 345191
        </row>
Packit 345191
        <row>
Packit 345191
          <entry>16</entry>
Packit 345191
          <entry>[16, 32, 48, 64, 80, 96, 112, 128]</entry>
Packit 345191
        </row>
Packit 345191
        <row>
Packit 345191
          <entry>32</entry>
Packit 345191
          <entry>[160, 192, 224, 256]</entry>
Packit 345191
        </row>
Packit 345191
        <row>
Packit 345191
          <entry>64</entry>
Packit 345191
          <entry>[320, 384, 448, 512]</entry>
Packit 345191
        </row>
Packit 345191
        <row>
Packit 345191
          <entry>128</entry>
Packit 345191
          <entry>[640, 768, 896, 1024]</entry>
Packit 345191
        </row>
Packit 345191
        <row>
Packit 345191
          <entry>256</entry>
Packit 345191
          <entry>[1280, 1536, 1792, 2048]</entry>
Packit 345191
        </row>
Packit 345191
        <row>
Packit 345191
          <entry>512</entry>
Packit 345191
          <entry>[2560, 3072, 3584, 4096]</entry>
Packit 345191
        </row>
Packit 345191
        <row>
Packit 345191
          <entry>1 KiB</entry>
Packit 345191
          <entry>[5 KiB, 6 KiB, 7 KiB, 8 KiB]</entry>
Packit 345191
        </row>
Packit 345191
        <row>
Packit 345191
          <entry>2 KiB</entry>
Packit 345191
          <entry>[10 KiB, 12 KiB, 14 KiB]</entry>
Packit 345191
        </row>
Packit 345191
        <row>
Packit 345191
          <entry morerows="15">Large</entry>
Packit 345191
          <entry>2 KiB</entry>
Packit 345191
          <entry>[16 KiB]</entry>
Packit 345191
        </row>
Packit 345191
        <row>
Packit 345191
          <entry>4 KiB</entry>
Packit 345191
          <entry>[20 KiB, 24 KiB, 28 KiB, 32 KiB]</entry>
Packit 345191
        </row>
Packit 345191
        <row>
Packit 345191
          <entry>8 KiB</entry>
Packit 345191
          <entry>[40 KiB, 48 KiB, 54 KiB, 64 KiB]</entry>
Packit 345191
        </row>
Packit 345191
        <row>
Packit 345191
          <entry>16 KiB</entry>
Packit 345191
          <entry>[80 KiB, 96 KiB, 112 KiB, 128 KiB]</entry>
Packit 345191
        </row>
Packit 345191
        <row>
Packit 345191
          <entry>32 KiB</entry>
Packit 345191
          <entry>[160 KiB, 192 KiB, 224 KiB, 256 KiB]</entry>
Packit 345191
        </row>
Packit 345191
        <row>
Packit 345191
          <entry>64 KiB</entry>
Packit 345191
          <entry>[320 KiB, 384 KiB, 448 KiB, 512 KiB]</entry>
Packit 345191
        </row>
Packit 345191
        <row>
Packit 345191
          <entry>128 KiB</entry>
Packit 345191
          <entry>[640 KiB, 768 KiB, 896 KiB, 1 MiB]</entry>
Packit 345191
        </row>
Packit 345191
        <row>
Packit 345191
          <entry>256 KiB</entry>
Packit 345191
          <entry>[1280 KiB, 1536 KiB, 1792 KiB, 2 MiB]</entry>
Packit 345191
        </row>
Packit 345191
        <row>
Packit 345191
          <entry>512 KiB</entry>
Packit 345191
          <entry>[2560 KiB, 3 MiB, 3584 KiB, 4 MiB]</entry>
Packit 345191
        </row>
Packit 345191
        <row>
Packit 345191
          <entry>1 MiB</entry>
Packit 345191
          <entry>[5 MiB, 6 MiB, 7 MiB, 8 MiB]</entry>
Packit 345191
        </row>
Packit 345191
        <row>
Packit 345191
          <entry>2 MiB</entry>
Packit 345191
          <entry>[10 MiB, 12 MiB, 14 MiB, 16 MiB]</entry>
Packit 345191
        </row>
Packit 345191
        <row>
Packit 345191
          <entry>4 MiB</entry>
Packit 345191
          <entry>[20 MiB, 24 MiB, 28 MiB, 32 MiB]</entry>
Packit 345191
        </row>
Packit 345191
        <row>
Packit 345191
          <entry>8 MiB</entry>
Packit 345191
          <entry>[40 MiB, 48 MiB, 56 MiB, 64 MiB]</entry>
Packit 345191
        </row>
Packit 345191
        <row>
Packit 345191
          <entry>...</entry>
Packit 345191
          <entry>...</entry>
Packit 345191
        </row>
Packit 345191
        <row>
Packit 345191
          <entry>512 PiB</entry>
Packit 345191
          <entry>[2560 PiB, 3 EiB, 3584 PiB, 4 EiB]</entry>
Packit 345191
        </row>
Packit 345191
        <row>
Packit 345191
          <entry>1 EiB</entry>
Packit 345191
          <entry>[5 EiB, 6 EiB, 7 EiB]</entry>
Packit 345191
        </row>
Packit 345191
      
Packit 345191
      </tgroup>
Packit 345191
    
Packit 345191
  </refsect1>
Packit 345191
  <refsect1 id="mallctl_namespace">
Packit 345191
    <title>MALLCTL NAMESPACE</title>
Packit 345191
    <para>The following names are defined in the namespace accessible via the
Packit 345191
    <function>mallctl*()</function> functions.  Value types are specified in
Packit 345191
    parentheses, their readable/writable statuses are encoded as
Packit 345191
    <literal>rw</literal>, <literal>r-</literal>, <literal>-w</literal>, or
Packit 345191
    <literal>--</literal>, and required build configuration flags follow, if
Packit 345191
    any.  A name element encoded as <literal><i></literal> or
Packit 345191
    <literal><j></literal> indicates an integer component, where the
Packit 345191
    integer varies from 0 to some upper value that must be determined via
Packit 345191
    introspection.  In the case of <mallctl>stats.arenas.<i>.*</mallctl>
Packit 345191
    and <mallctl>arena.<i>.{initialized,purge,decay,dss}</mallctl>,
Packit 345191
    <literal><i></literal> equal to
Packit 345191
    <constant>MALLCTL_ARENAS_ALL</constant> can be used to operate on all arenas
Packit 345191
    or access the summation of statistics from all arenas; similarly
Packit 345191
    <literal><i></literal> equal to
Packit 345191
    <constant>MALLCTL_ARENAS_DESTROYED</constant> can be used to access the
Packit 345191
    summation of statistics from all destroyed arenas.  These constants can be
Packit 345191
    utilized either via <function>mallctlnametomib()</function> followed by
Packit 345191
    <function>mallctlbymib()</function>, or via code such as the following:
Packit 345191
    <programlisting language="C">
Packit 345191
#define STRINGIFY_HELPER(x) #x
Packit 345191
#define STRINGIFY(x) STRINGIFY_HELPER(x)
Packit 345191
Packit 345191
mallctl("arena." STRINGIFY(MALLCTL_ARENAS_ALL) ".decay",
Packit 345191
    NULL, NULL, NULL, 0);]]></programlisting>
Packit 345191
    Take special note of the 
Packit 345191
    linkend="epoch"><mallctl>epoch</mallctl></link> mallctl, which controls
Packit 345191
    refreshing of cached dynamic statistics.</para>
Packit 345191
Packit 345191
    <variablelist>
Packit 345191
      <varlistentry id="version">
Packit 345191
        <term>
Packit 345191
          <mallctl>version</mallctl>
Packit 345191
          (<type>const char *</type>)
Packit 345191
          <literal>r-</literal>
Packit 345191
        </term>
Packit 345191
        <listitem><para>Return the jemalloc version string.</para></listitem>
Packit 345191
      </varlistentry>
Packit 345191
Packit 345191
      <varlistentry id="epoch">
Packit 345191
        <term>
Packit 345191
          <mallctl>epoch</mallctl>
Packit 345191
          (<type>uint64_t</type>)
Packit 345191
          <literal>rw</literal>
Packit 345191
        </term>
Packit 345191
        <listitem><para>If a value is passed in, refresh the data from which
Packit 345191
        the <function>mallctl*()</function> functions report values,
Packit 345191
        and increment the epoch.  Return the current epoch.  This is useful for
Packit 345191
        detecting whether another thread caused a refresh.</para></listitem>
Packit 345191
      </varlistentry>
Packit 345191
Packit 345191
      <varlistentry id="background_thread">
Packit 345191
        <term>
Packit 345191
          <mallctl>background_thread</mallctl>
Packit 345191
          (<type>bool</type>)
Packit 345191
          <literal>rw</literal>
Packit 345191
        </term>
Packit 345191
        <listitem><para>Enable/disable internal background worker threads.  When
Packit 345191
        set to true, background threads are created on demand (the number of
Packit 345191
        background threads will be no more than the number of CPUs or active
Packit 345191
        arenas).  Threads run periodically, and handle 
Packit 345191
        linkend="arena.i.decay">purging</link> asynchronously.  When switching
Packit 345191
        off, background threads are terminated synchronously.  Note that after
Packit 345191
        <citerefentry><refentrytitle>fork</refentrytitle><manvolnum>2</manvolnum></citerefentry>
Packit 345191
        function, the state in the child process will be disabled regardless
Packit 345191
        the state in parent process. See 
Packit 345191
        linkend="stats.background_thread.num_threads"><mallctl>stats.background_thread</mallctl></link>
Packit 345191
        for related stats.  
Packit 345191
        linkend="opt.background_thread"><mallctl>opt.background_thread</mallctl></link>
Packit 345191
        can be used to set the default option.  This option is only available on
Packit 345191
        selected pthread-based platforms.</para></listitem>
Packit 345191
      </varlistentry>
Packit 345191
Packit 345191
      <varlistentry id="max_background_threads">
Packit 345191
        <term>
Packit 345191
          <mallctl>max_background_threads</mallctl>
Packit 345191
          (<type>size_t</type>)
Packit 345191
          <literal>rw</literal>
Packit 345191
        </term>
Packit 345191
        <listitem><para>Maximum number of background worker threads that will
Packit 345191
        be created.  This value is capped at 
Packit 345191
        linkend="opt.max_background_threads"><mallctl>opt.max_background_threads</mallctl></link> at
Packit 345191
        startup.</para></listitem>
Packit 345191
      </varlistentry>
Packit 345191
Packit 345191
      <varlistentry id="config.cache_oblivious">
Packit 345191
        <term>
Packit 345191
          <mallctl>config.cache_oblivious</mallctl>
Packit 345191
          (<type>bool</type>)
Packit 345191
          <literal>r-</literal>
Packit 345191
        </term>
Packit 345191
        <listitem><para><option>--enable-cache-oblivious</option> was specified
Packit 345191
        during build configuration.</para></listitem>
Packit 345191
      </varlistentry>
Packit 345191
Packit 345191
      <varlistentry id="config.debug">
Packit 345191
        <term>
Packit 345191
          <mallctl>config.debug</mallctl>
Packit 345191
          (<type>bool</type>)
Packit 345191
          <literal>r-</literal>
Packit 345191
        </term>
Packit 345191
        <listitem><para><option>--enable-debug</option> was specified during
Packit 345191
        build configuration.</para></listitem>
Packit 345191
      </varlistentry>
Packit 345191
Packit 345191
      <varlistentry id="config.fill">
Packit 345191
        <term>
Packit 345191
          <mallctl>config.fill</mallctl>
Packit 345191
          (<type>bool</type>)
Packit 345191
          <literal>r-</literal>
Packit 345191
        </term>
Packit 345191
        <listitem><para><option>--enable-fill</option> was specified during
Packit 345191
        build configuration.</para></listitem>
Packit 345191
      </varlistentry>
Packit 345191
Packit 345191
      <varlistentry id="config.lazy_lock">
Packit 345191
        <term>
Packit 345191
          <mallctl>config.lazy_lock</mallctl>
Packit 345191
          (<type>bool</type>)
Packit 345191
          <literal>r-</literal>
Packit 345191
        </term>
Packit 345191
        <listitem><para><option>--enable-lazy-lock</option> was specified
Packit 345191
        during build configuration.</para></listitem>
Packit 345191
      </varlistentry>
Packit 345191
Packit 345191
      <varlistentry id="config.malloc_conf">
Packit 345191
        <term>
Packit 345191
          <mallctl>config.malloc_conf</mallctl>
Packit 345191
          (<type>const char *</type>)
Packit 345191
          <literal>r-</literal>
Packit 345191
        </term>
Packit 345191
        <listitem><para>Embedded configure-time-specified run-time options
Packit 345191
        string, empty unless <option>--with-malloc-conf</option> was specified
Packit 345191
        during build configuration.</para></listitem>
Packit 345191
      </varlistentry>
Packit 345191
Packit 345191
      <varlistentry id="config.prof">
Packit 345191
        <term>
Packit 345191
          <mallctl>config.prof</mallctl>
Packit 345191
          (<type>bool</type>)
Packit 345191
          <literal>r-</literal>
Packit 345191
        </term>
Packit 345191
        <listitem><para><option>--enable-prof</option> was specified during
Packit 345191
        build configuration.</para></listitem>
Packit 345191
      </varlistentry>
Packit 345191
Packit 345191
      <varlistentry id="config.prof_libgcc">
Packit 345191
        <term>
Packit 345191
          <mallctl>config.prof_libgcc</mallctl>
Packit 345191
          (<type>bool</type>)
Packit 345191
          <literal>r-</literal>
Packit 345191
        </term>
Packit 345191
        <listitem><para><option>--disable-prof-libgcc</option> was not
Packit 345191
        specified during build configuration.</para></listitem>
Packit 345191
      </varlistentry>
Packit 345191
Packit 345191
      <varlistentry id="config.prof_libunwind">
Packit 345191
        <term>
Packit 345191
          <mallctl>config.prof_libunwind</mallctl>
Packit 345191
          (<type>bool</type>)
Packit 345191
          <literal>r-</literal>
Packit 345191
        </term>
Packit 345191
        <listitem><para><option>--enable-prof-libunwind</option> was specified
Packit 345191
        during build configuration.</para></listitem>
Packit 345191
      </varlistentry>
Packit 345191
Packit 345191
      <varlistentry id="config.stats">
Packit 345191
        <term>
Packit 345191
          <mallctl>config.stats</mallctl>
Packit 345191
          (<type>bool</type>)
Packit 345191
          <literal>r-</literal>
Packit 345191
        </term>
Packit 345191
        <listitem><para><option>--enable-stats</option> was specified during
Packit 345191
        build configuration.</para></listitem>
Packit 345191
      </varlistentry>
Packit 345191
Packit 345191
Packit 345191
      <varlistentry id="config.utrace">
Packit 345191
        <term>
Packit 345191
          <mallctl>config.utrace</mallctl>
Packit 345191
          (<type>bool</type>)
Packit 345191
          <literal>r-</literal>
Packit 345191
        </term>
Packit 345191
        <listitem><para><option>--enable-utrace</option> was specified during
Packit 345191
        build configuration.</para></listitem>
Packit 345191
      </varlistentry>
Packit 345191
Packit 345191
      <varlistentry id="config.xmalloc">
Packit 345191
        <term>
Packit 345191
          <mallctl>config.xmalloc</mallctl>
Packit 345191
          (<type>bool</type>)
Packit 345191
          <literal>r-</literal>
Packit 345191
        </term>
Packit 345191
        <listitem><para><option>--enable-xmalloc</option> was specified during
Packit 345191
        build configuration.</para></listitem>
Packit 345191
      </varlistentry>
Packit 345191
Packit 345191
      <varlistentry id="opt.abort">
Packit 345191
        <term>
Packit 345191
          <mallctl>opt.abort</mallctl>
Packit 345191
          (<type>bool</type>)
Packit 345191
          <literal>r-</literal>
Packit 345191
        </term>
Packit 345191
        <listitem><para>Abort-on-warning enabled/disabled.  If true, most
Packit 345191
        warnings are fatal.  Note that runtime option warnings are not included
Packit 345191
        (see 
Packit 345191
        linkend="opt.abort_conf"><mallctl>opt.abort_conf</mallctl></link> for
Packit 345191
        that). The process will call
Packit 345191
        <citerefentry><refentrytitle>abort</refentrytitle>
Packit 345191
        <manvolnum>3</manvolnum></citerefentry> in these cases.  This option is
Packit 345191
        disabled by default unless <option>--enable-debug</option> is
Packit 345191
        specified during configuration, in which case it is enabled by default.
Packit 345191
        </para></listitem>
Packit 345191
      </varlistentry>
Packit 345191
Packit 345191
      <varlistentry id="opt.confirm_conf">
Packit 345191
        <term>
Packit 345191
          <mallctl>opt.confirm_conf</mallctl>
Packit 345191
          (<type>bool</type>)
Packit 345191
          <literal>r-</literal>
Packit 345191
        </term>
Packit 345191
	<listitem><para>Confirm-runtime-options-when-program-starts
Packit 345191
	enabled/disabled.  If true, the string specified via
Packit 345191
	<option>--with-malloc-conf</option>, the string pointed to by the
Packit 345191
	global variable <varname>malloc_conf</varname>, the <quote>name</quote>
Packit 345191
	of the file referenced by the symbolic link named
Packit 345191
	<filename class="symlink">/etc/malloc.conf</filename>, and the value of
Packit 345191
	the environment variable <envar>MALLOC_CONF</envar>, will be printed in
Packit 345191
	order.  Then, each option being set will be individually printed.  This
Packit 345191
	option is disabled by default.</para></listitem>
Packit 345191
      </varlistentry>
Packit 345191
Packit 345191
      <varlistentry id="opt.abort_conf">
Packit 345191
        <term>
Packit 345191
          <mallctl>opt.abort_conf</mallctl>
Packit 345191
          (<type>bool</type>)
Packit 345191
          <literal>r-</literal>
Packit 345191
        </term>
Packit 345191
        <listitem><para>Abort-on-invalid-configuration enabled/disabled.  If
Packit 345191
        true, invalid runtime options are fatal.  The process will call
Packit 345191
        <citerefentry><refentrytitle>abort</refentrytitle>
Packit 345191
        <manvolnum>3</manvolnum></citerefentry> in these cases.  This option is
Packit 345191
        disabled by default unless <option>--enable-debug</option> is
Packit 345191
        specified during configuration, in which case it is enabled by default.
Packit 345191
        </para></listitem>
Packit 345191
      </varlistentry>
Packit 345191
Packit 345191
      <varlistentry id="opt.metadata_thp">
Packit 345191
        <term>
Packit 345191
          <mallctl>opt.metadata_thp</mallctl>
Packit 345191
          (<type>const char *</type>)
Packit 345191
          <literal>r-</literal>
Packit 345191
        </term>
Packit 345191
        <listitem><para>Controls whether to allow jemalloc to use transparent
Packit 345191
        huge page (THP) for internal metadata (see 
Packit 345191
        linkend="stats.metadata">stats.metadata</link>).  <quote>always</quote>
Packit 345191
        allows such usage.  <quote>auto</quote> uses no THP initially, but may
Packit 345191
        begin to do so when metadata usage reaches certain level.  The default
Packit 345191
        is <quote>disabled</quote>.</para></listitem>
Packit 345191
      </varlistentry>
Packit 345191
Packit 345191
      <varlistentry id="opt.retain">
Packit 345191
        <term>
Packit 345191
          <mallctl>opt.retain</mallctl>
Packit 345191
          (<type>bool</type>)
Packit 345191
          <literal>r-</literal>
Packit 345191
        </term>
Packit 345191
        <listitem><para>If true, retain unused virtual memory for later reuse
Packit 345191
        rather than discarding it by calling
Packit 345191
        <citerefentry><refentrytitle>munmap</refentrytitle>
Packit 345191
        <manvolnum>2</manvolnum></citerefentry> or equivalent (see 
Packit 345191
        linkend="stats.retained">stats.retained</link> for related details).
Packit 345191
        It also makes jemalloc use <citerefentry>
Packit 345191
        <refentrytitle>mmap</refentrytitle><manvolnum>2</manvolnum>
Packit 345191
        </citerefentry> or equivalent in a more greedy way, mapping larger
Packit 345191
        chunks in one go.  This option is disabled by default unless discarding
Packit 345191
        virtual memory is known to trigger platform-specific performance
Packit 345191
        problems, namely 1) for [64-bit] Linux, which has a quirk in its virtual
Packit 345191
        memory allocation algorithm that causes semi-permanent VM map holes
Packit 345191
        under normal jemalloc operation; and 2) for [64-bit] Windows, which
Packit 345191
        disallows split / merged regions with
Packit 345191
        <parameter><constant>MEM_RELEASE</constant></parameter>.  Although the
Packit 345191
        same issues may present on 32-bit platforms as well, retaining virtual
Packit 345191
        memory for 32-bit Linux and Windows is disabled by default due to the
Packit 345191
        practical possibility of address space exhaustion.  </para></listitem>
Packit 345191
      </varlistentry>
Packit 345191
Packit 345191
      <varlistentry id="opt.dss">
Packit 345191
        <term>
Packit 345191
          <mallctl>opt.dss</mallctl>
Packit 345191
          (<type>const char *</type>)
Packit 345191
          <literal>r-</literal>
Packit 345191
        </term>
Packit 345191
        <listitem><para>dss (<citerefentry><refentrytitle>sbrk</refentrytitle>
Packit 345191
        <manvolnum>2</manvolnum></citerefentry>) allocation precedence as
Packit 345191
        related to <citerefentry><refentrytitle>mmap</refentrytitle>
Packit 345191
        <manvolnum>2</manvolnum></citerefentry> allocation.  The following
Packit 345191
        settings are supported if
Packit 345191
        <citerefentry><refentrytitle>sbrk</refentrytitle>
Packit 345191
        <manvolnum>2</manvolnum></citerefentry> is supported by the operating
Packit 345191
        system: <quote>disabled</quote>, <quote>primary</quote>, and
Packit 345191
        <quote>secondary</quote>; otherwise only <quote>disabled</quote> is
Packit 345191
        supported.  The default is <quote>secondary</quote> if
Packit 345191
        <citerefentry><refentrytitle>sbrk</refentrytitle>
Packit 345191
        <manvolnum>2</manvolnum></citerefentry> is supported by the operating
Packit 345191
        system; <quote>disabled</quote> otherwise.
Packit 345191
        </para></listitem>
Packit 345191
      </varlistentry>
Packit 345191
Packit 345191
      <varlistentry id="opt.narenas">
Packit 345191
        <term>
Packit 345191
          <mallctl>opt.narenas</mallctl>
Packit 345191
          (<type>unsigned</type>)
Packit 345191
          <literal>r-</literal>
Packit 345191
        </term>
Packit 345191
        <listitem><para>Maximum number of arenas to use for automatic
Packit 345191
        multiplexing of threads and arenas.  The default is four times the
Packit 345191
        number of CPUs, or one if there is a single CPU.</para></listitem>
Packit 345191
      </varlistentry>
Packit 345191
Packit 345191
      <varlistentry id="opt.oversize_threshold">
Packit 345191
        <term>
Packit 345191
          <mallctl>opt.oversize_threshold</mallctl>
Packit 345191
          (<type>size_t</type>)
Packit 345191
          <literal>r-</literal>
Packit 345191
        </term>
Packit 345191
        <listitem><para>The threshold in bytes of which requests are considered
Packit 345191
        oversize.  Allocation requests with greater sizes are fulfilled from a
Packit 345191
        dedicated arena (automatically managed, however not within
Packit 345191
        <literal>narenas</literal>), in order to reduce fragmentation by not
Packit 345191
        mixing huge allocations with small ones.  In addition, the decay API
Packit 345191
        guarantees on the extents greater than the specified threshold may be
Packit 345191
        overridden.  Note that requests with arena index specified via
Packit 345191
        <constant>MALLOCX_ARENA</constant>, or threads associated with explicit
Packit 345191
        arenas will not be considered.  The default threshold is 8MiB.  Values
Packit 345191
        not within large size classes disables this feature.</para></listitem>
Packit 345191
      </varlistentry>
Packit 345191
Packit 345191
      <varlistentry id="opt.percpu_arena">
Packit 345191
        <term>
Packit 345191
          <mallctl>opt.percpu_arena</mallctl>
Packit 345191
          (<type>const char *</type>)
Packit 345191
          <literal>r-</literal>
Packit 345191
        </term>
Packit 345191
        <listitem><para>Per CPU arena mode.  Use the <quote>percpu</quote>
Packit 345191
        setting to enable this feature, which uses number of CPUs to determine
Packit 345191
        number of arenas, and bind threads to arenas dynamically based on the
Packit 345191
        CPU the thread runs on currently.  <quote>phycpu</quote> setting uses
Packit 345191
        one arena per physical CPU, which means the two hyper threads on the
Packit 345191
        same CPU share one arena.  Note that no runtime checking regarding the
Packit 345191
        availability of hyper threading is done at the moment.  When set to
Packit 345191
        <quote>disabled</quote>, narenas and thread to arena association will
Packit 345191
        not be impacted by this option.  The default is <quote>disabled</quote>.
Packit 345191
        </para></listitem>
Packit 345191
      </varlistentry>
Packit 345191
Packit 345191
      <varlistentry id="opt.background_thread">
Packit 345191
        <term>
Packit 345191
          <mallctl>opt.background_thread</mallctl>
Packit 345191
          (<type>bool</type>)
Packit 345191
          <literal>r-</literal>
Packit 345191
        </term>
Packit 345191
        <listitem><para>Internal background worker threads enabled/disabled.
Packit 345191
        Because of potential circular dependencies, enabling background thread
Packit 345191
        using this option may cause crash or deadlock during initialization. For
Packit 345191
        a reliable way to use this feature, see 
Packit 345191
        linkend="background_thread">background_thread</link> for dynamic control
Packit 345191
        options and details.  This option is disabled by
Packit 345191
        default.</para></listitem>
Packit 345191
      </varlistentry>
Packit 345191
Packit 345191
      <varlistentry id="opt.max_background_threads">
Packit 345191
        <term>
Packit 345191
          <mallctl>opt.max_background_threads</mallctl>
Packit 345191
          (<type>size_t</type>)
Packit 345191
          <literal>r-</literal>
Packit 345191
        </term>
Packit 345191
        <listitem><para>Maximum number of background threads that will be created
Packit 345191
        if <link linkend="background_thread">background_thread</link> is set.
Packit 345191
        Defaults to number of cpus.</para></listitem>
Packit 345191
      </varlistentry>
Packit 345191
Packit 345191
      <varlistentry id="opt.dirty_decay_ms">
Packit 345191
        <term>
Packit 345191
          <mallctl>opt.dirty_decay_ms</mallctl>
Packit 345191
          (<type>ssize_t</type>)
Packit 345191
          <literal>r-</literal>
Packit 345191
        </term>
Packit 345191
        <listitem><para>Approximate time in milliseconds from the creation of a
Packit 345191
        set of unused dirty pages until an equivalent set of unused dirty pages
Packit 345191
        is purged (i.e. converted to muzzy via e.g.
Packit 345191
        <function>madvise(<parameter>...</parameter><parameter><constant>MADV_FREE</constant></parameter>)</function>
Packit 345191
        if supported by the operating system, or converted to clean otherwise)
Packit 345191
        and/or reused.  Dirty pages are defined as previously having been
Packit 345191
        potentially written to by the application, and therefore consuming
Packit 345191
        physical memory, yet having no current use.  The pages are incrementally
Packit 345191
        purged according to a sigmoidal decay curve that starts and ends with
Packit 345191
        zero purge rate.  A decay time of 0 causes all unused dirty pages to be
Packit 345191
        purged immediately upon creation.  A decay time of -1 disables purging.
Packit 345191
        The default decay time is 10 seconds.  See 
Packit 345191
        linkend="arenas.dirty_decay_ms"><mallctl>arenas.dirty_decay_ms</mallctl></link>
Packit 345191
        and 
Packit 345191
        linkend="arena.i.dirty_decay_ms"><mallctl>arena.<i>.dirty_decay_ms</mallctl></link>
Packit 345191
        for related dynamic control options.  See 
Packit 345191
        linkend="opt.muzzy_decay_ms"><mallctl>opt.muzzy_decay_ms</mallctl></link>
Packit 345191
        for a description of muzzy pages.for a description of muzzy pages.  Note
Packit 345191
        that when the 
Packit 345191
        linkend="opt.oversize_threshold"><mallctl>oversize_threshold</mallctl></link>
Packit 345191
        feature is enabled, the arenas reserved for oversize requests may have
Packit 345191
        its own default decay settings.</para></listitem>
Packit 345191
      </varlistentry>
Packit 345191
Packit 345191
      <varlistentry id="opt.muzzy_decay_ms">
Packit 345191
        <term>
Packit 345191
          <mallctl>opt.muzzy_decay_ms</mallctl>
Packit 345191
          (<type>ssize_t</type>)
Packit 345191
          <literal>r-</literal>
Packit 345191
        </term>
Packit 345191
        <listitem><para>Approximate time in milliseconds from the creation of a
Packit 345191
        set of unused muzzy pages until an equivalent set of unused muzzy pages
Packit 345191
        is purged (i.e. converted to clean) and/or reused.  Muzzy pages are
Packit 345191
        defined as previously having been unused dirty pages that were
Packit 345191
        subsequently purged in a manner that left them subject to the
Packit 345191
        reclamation whims of the operating system (e.g.
Packit 345191
        <function>madvise(<parameter>...</parameter><parameter><constant>MADV_FREE</constant></parameter>)</function>),
Packit 345191
        and therefore in an indeterminate state.  The pages are incrementally
Packit 345191
        purged according to a sigmoidal decay curve that starts and ends with
Packit 345191
        zero purge rate.  A decay time of 0 causes all unused muzzy pages to be
Packit 345191
        purged immediately upon creation.  A decay time of -1 disables purging.
Packit 345191
        The default decay time is 10 seconds.  See 
Packit 345191
        linkend="arenas.muzzy_decay_ms"><mallctl>arenas.muzzy_decay_ms</mallctl></link>
Packit 345191
        and 
Packit 345191
        linkend="arena.i.muzzy_decay_ms"><mallctl>arena.<i>.muzzy_decay_ms</mallctl></link>
Packit 345191
        for related dynamic control options.</para></listitem>
Packit 345191
      </varlistentry>
Packit 345191
Packit 345191
      <varlistentry id="opt.lg_extent_max_active_fit">
Packit 345191
        <term>
Packit 345191
          <mallctl>opt.lg_extent_max_active_fit</mallctl>
Packit 345191
          (<type>size_t</type>)
Packit 345191
          <literal>r-</literal>
Packit 345191
        </term>
Packit 345191
        <listitem><para>When reusing dirty extents, this determines the (log
Packit 345191
        base 2 of the) maximum ratio between the size of the active extent
Packit 345191
        selected (to split off from) and the size of the requested allocation.
Packit 345191
        This prevents the splitting of large active extents for smaller
Packit 345191
        allocations, which can reduce fragmentation over the long run
Packit 345191
        (especially for non-active extents).  Lower value may reduce
Packit 345191
        fragmentation, at the cost of extra active extents.  The default value
Packit 345191
        is 6, which gives a maximum ratio of 64 (2^6).</para></listitem>
Packit 345191
      </varlistentry>
Packit 345191
Packit 345191
      <varlistentry id="opt.stats_print">
Packit 345191
        <term>
Packit 345191
          <mallctl>opt.stats_print</mallctl>
Packit 345191
          (<type>bool</type>)
Packit 345191
          <literal>r-</literal>
Packit 345191
        </term>
Packit 345191
        <listitem><para>Enable/disable statistics printing at exit.  If
Packit 345191
        enabled, the <function>malloc_stats_print()</function>
Packit 345191
        function is called at program exit via an
Packit 345191
        <citerefentry><refentrytitle>atexit</refentrytitle>
Packit 345191
        <manvolnum>3</manvolnum></citerefentry> function.  
Packit 345191
        linkend="opt.stats_print_opts"><mallctl>opt.stats_print_opts</mallctl></link>
Packit 345191
        can be combined to specify output options. If
Packit 345191
        <option>--enable-stats</option> is specified during configuration, this
Packit 345191
        has the potential to cause deadlock for a multi-threaded process that
Packit 345191
        exits while one or more threads are executing in the memory allocation
Packit 345191
        functions.  Furthermore, <function>atexit()</function> may
Packit 345191
        allocate memory during application initialization and then deadlock
Packit 345191
        internally when jemalloc in turn calls
Packit 345191
        <function>atexit()</function>, so this option is not
Packit 345191
        universally usable (though the application can register its own
Packit 345191
        <function>atexit()</function> function with equivalent
Packit 345191
        functionality).  Therefore, this option should only be used with care;
Packit 345191
        it is primarily intended as a performance tuning aid during application
Packit 345191
        development.  This option is disabled by default.</para></listitem>
Packit 345191
      </varlistentry>
Packit 345191
Packit 345191
      <varlistentry id="opt.stats_print_opts">
Packit 345191
        <term>
Packit 345191
          <mallctl>opt.stats_print_opts</mallctl>
Packit 345191
          (<type>const char *</type>)
Packit 345191
          <literal>r-</literal>
Packit 345191
        </term>
Packit 345191
        <listitem><para>Options (the <parameter>opts</parameter> string) to pass
Packit 345191
        to the <function>malloc_stats_print()</function> at exit (enabled
Packit 345191
        through 
Packit 345191
        linkend="opt.stats_print"><mallctl>opt.stats_print</mallctl></link>). See
Packit 345191
        available options in 
Packit 345191
        linkend="malloc_stats_print_opts"><function>malloc_stats_print()</function></link>.
Packit 345191
        Has no effect unless 
Packit 345191
        linkend="opt.stats_print"><mallctl>opt.stats_print</mallctl></link> is
Packit 345191
        enabled.  The default is <quote></quote>.</para></listitem>
Packit 345191
      </varlistentry>
Packit 345191
Packit 345191
      <varlistentry id="opt.junk">
Packit 345191
        <term>
Packit 345191
          <mallctl>opt.junk</mallctl>
Packit 345191
          (<type>const char *</type>)
Packit 345191
          <literal>r-</literal>
Packit 345191
          [<option>--enable-fill</option>]
Packit 345191
        </term>
Packit 345191
        <listitem><para>Junk filling.  If set to <quote>alloc</quote>, each byte
Packit 345191
        of uninitialized allocated memory will be initialized to
Packit 345191
        <literal>0xa5</literal>.  If set to <quote>free</quote>, all deallocated
Packit 345191
        memory will be initialized to <literal>0x5a</literal>.  If set to
Packit 345191
        <quote>true</quote>, both allocated and deallocated memory will be
Packit 345191
        initialized, and if set to <quote>false</quote>, junk filling be
Packit 345191
        disabled entirely.  This is intended for debugging and will impact
Packit 345191
        performance negatively.  This option is <quote>false</quote> by default
Packit 345191
        unless <option>--enable-debug</option> is specified during
Packit 345191
        configuration, in which case it is <quote>true</quote> by
Packit 345191
        default.</para></listitem>
Packit 345191
      </varlistentry>
Packit 345191
Packit 345191
      <varlistentry id="opt.zero">
Packit 345191
        <term>
Packit 345191
          <mallctl>opt.zero</mallctl>
Packit 345191
          (<type>bool</type>)
Packit 345191
          <literal>r-</literal>
Packit 345191
          [<option>--enable-fill</option>]
Packit 345191
        </term>
Packit 345191
        <listitem><para>Zero filling enabled/disabled.  If enabled, each byte
Packit 345191
        of uninitialized allocated memory will be initialized to 0.  Note that
Packit 345191
        this initialization only happens once for each byte, so
Packit 345191
        <function>realloc()</function> and
Packit 345191
        <function>rallocx()</function> calls do not zero memory that
Packit 345191
        was previously allocated.  This is intended for debugging and will
Packit 345191
        impact performance negatively.  This option is disabled by default.
Packit 345191
        </para></listitem>
Packit 345191
      </varlistentry>
Packit 345191
Packit 345191
      <varlistentry id="opt.utrace">
Packit 345191
        <term>
Packit 345191
          <mallctl>opt.utrace</mallctl>
Packit 345191
          (<type>bool</type>)
Packit 345191
          <literal>r-</literal>
Packit 345191
          [<option>--enable-utrace</option>]
Packit 345191
        </term>
Packit 345191
        <listitem><para>Allocation tracing based on
Packit 345191
        <citerefentry><refentrytitle>utrace</refentrytitle>
Packit 345191
        <manvolnum>2</manvolnum></citerefentry> enabled/disabled.  This option
Packit 345191
        is disabled by default.</para></listitem>
Packit 345191
      </varlistentry>
Packit 345191
Packit 345191
      <varlistentry id="opt.xmalloc">
Packit 345191
        <term>
Packit 345191
          <mallctl>opt.xmalloc</mallctl>
Packit 345191
          (<type>bool</type>)
Packit 345191
          <literal>r-</literal>
Packit 345191
          [<option>--enable-xmalloc</option>]
Packit 345191
        </term>
Packit 345191
        <listitem><para>Abort-on-out-of-memory enabled/disabled.  If enabled,
Packit 345191
        rather than returning failure for any allocation function, display a
Packit 345191
        diagnostic message on <constant>STDERR_FILENO</constant> and cause the
Packit 345191
        program to drop core (using
Packit 345191
        <citerefentry><refentrytitle>abort</refentrytitle>
Packit 345191
        <manvolnum>3</manvolnum></citerefentry>).  If an application is
Packit 345191
        designed to depend on this behavior, set the option at compile time by
Packit 345191
        including the following in the source code:
Packit 345191
        <programlisting language="C">
Packit 345191
malloc_conf = "xmalloc:true";]]></programlisting>
Packit 345191
        This option is disabled by default.</para></listitem>
Packit 345191
      </varlistentry>
Packit 345191
Packit 345191
      <varlistentry id="opt.tcache">
Packit 345191
        <term>
Packit 345191
          <mallctl>opt.tcache</mallctl>
Packit 345191
          (<type>bool</type>)
Packit 345191
          <literal>r-</literal>
Packit 345191
        </term>
Packit 345191
        <listitem><para>Thread-specific caching (tcache) enabled/disabled.  When
Packit 345191
        there are multiple threads, each thread uses a tcache for objects up to
Packit 345191
        a certain size.  Thread-specific caching allows many allocations to be
Packit 345191
        satisfied without performing any thread synchronization, at the cost of
Packit 345191
        increased memory use.  See the 
Packit 345191
        linkend="opt.lg_tcache_max"><mallctl>opt.lg_tcache_max</mallctl></link>
Packit 345191
        option for related tuning information.  This option is enabled by
Packit 345191
        default.</para></listitem>
Packit 345191
      </varlistentry>
Packit 345191
Packit 345191
      <varlistentry id="opt.lg_tcache_max">
Packit 345191
        <term>
Packit 345191
          <mallctl>opt.lg_tcache_max</mallctl>
Packit 345191
          (<type>size_t</type>)
Packit 345191
          <literal>r-</literal>
Packit 345191
        </term>
Packit 345191
        <listitem><para>Maximum size class (log base 2) to cache in the
Packit 345191
        thread-specific cache (tcache).  At a minimum, all small size classes
Packit 345191
        are cached, and at a maximum all large size classes are cached.  The
Packit 345191
        default maximum is 32 KiB (2^15).</para></listitem>
Packit 345191
      </varlistentry>
Packit 345191
Packit 345191
      <varlistentry id="opt.thp">
Packit 345191
        <term>
Packit 345191
          <mallctl>opt.thp</mallctl>
Packit 345191
          (<type>const char *</type>)
Packit 345191
          <literal>r-</literal>
Packit 345191
        </term>
Packit 345191
        <listitem><para>Transparent hugepage (THP) mode. Settings "always",
Packit 345191
        "never" and "default" are available if THP is supported by the operating
Packit 345191
        system.  The "always" setting enables transparent hugepage for all user
Packit 345191
        memory mappings with
Packit 345191
        <parameter><constant>MADV_HUGEPAGE</constant></parameter>; "never"
Packit 345191
        ensures no transparent hugepage with
Packit 345191
        <parameter><constant>MADV_NOHUGEPAGE</constant></parameter>; the default
Packit 345191
        setting "default" makes no changes.  Note that: this option does not
Packit 345191
        affect THP for jemalloc internal metadata (see 
Packit 345191
        linkend="opt.metadata_thp"><mallctl>opt.metadata_thp</mallctl></link>);
Packit 345191
        in addition, for arenas with customized 
Packit 345191
        linkend="arena.i.extent_hooks"><mallctl>extent_hooks</mallctl></link>,
Packit 345191
        this option is bypassed as it is implemented as part of the default
Packit 345191
        extent hooks.</para></listitem>
Packit 345191
      </varlistentry>
Packit 345191
Packit 345191
      <varlistentry id="opt.prof">
Packit 345191
        <term>
Packit 345191
          <mallctl>opt.prof</mallctl>
Packit 345191
          (<type>bool</type>)
Packit 345191
          <literal>r-</literal>
Packit 345191
          [<option>--enable-prof</option>]
Packit 345191
        </term>
Packit 345191
        <listitem><para>Memory profiling enabled/disabled.  If enabled, profile
Packit 345191
        memory allocation activity.  See the 
Packit 345191
        linkend="opt.prof_active"><mallctl>opt.prof_active</mallctl></link>
Packit 345191
        option for on-the-fly activation/deactivation.  See the 
Packit 345191
        linkend="opt.lg_prof_sample"><mallctl>opt.lg_prof_sample</mallctl></link>
Packit 345191
        option for probabilistic sampling control.  See the 
Packit 345191
        linkend="opt.prof_accum"><mallctl>opt.prof_accum</mallctl></link>
Packit 345191
        option for control of cumulative sample reporting.  See the 
Packit 345191
        linkend="opt.lg_prof_interval"><mallctl>opt.lg_prof_interval</mallctl></link>
Packit 345191
        option for information on interval-triggered profile dumping, the 
Packit 345191
        linkend="opt.prof_gdump"><mallctl>opt.prof_gdump</mallctl></link>
Packit 345191
        option for information on high-water-triggered profile dumping, and the
Packit 345191
        <link linkend="opt.prof_final"><mallctl>opt.prof_final</mallctl></link>
Packit 345191
        option for final profile dumping.  Profile output is compatible with
Packit 345191
        the <command>jeprof</command> command, which is based on the
Packit 345191
        <command>pprof</command> that is developed as part of the 
Packit 345191
        url="http://code.google.com/p/gperftools/">gperftools
Packit 345191
        package</ulink>.  See <link linkend="heap_profile_format">HEAP PROFILE
Packit 345191
        FORMAT</link> for heap profile format documentation.</para></listitem>
Packit 345191
      </varlistentry>
Packit 345191
Packit 345191
      <varlistentry id="opt.prof_prefix">
Packit 345191
        <term>
Packit 345191
          <mallctl>opt.prof_prefix</mallctl>
Packit 345191
          (<type>const char *</type>)
Packit 345191
          <literal>r-</literal>
Packit 345191
          [<option>--enable-prof</option>]
Packit 345191
        </term>
Packit 345191
        <listitem><para>Filename prefix for profile dumps.  If the prefix is
Packit 345191
        set to the empty string, no automatic dumps will occur; this is
Packit 345191
        primarily useful for disabling the automatic final heap dump (which
Packit 345191
        also disables leak reporting, if enabled).  The default prefix is
Packit 345191
        <filename>jeprof</filename>.</para></listitem>
Packit 345191
      </varlistentry>
Packit 345191
Packit 345191
      <varlistentry id="opt.prof_active">
Packit 345191
        <term>
Packit 345191
          <mallctl>opt.prof_active</mallctl>
Packit 345191
          (<type>bool</type>)
Packit 345191
          <literal>r-</literal>
Packit 345191
          [<option>--enable-prof</option>]
Packit 345191
        </term>
Packit 345191
        <listitem><para>Profiling activated/deactivated.  This is a secondary
Packit 345191
        control mechanism that makes it possible to start the application with
Packit 345191
        profiling enabled (see the 
Packit 345191
        linkend="opt.prof"><mallctl>opt.prof</mallctl></link> option) but
Packit 345191
        inactive, then toggle profiling at any time during program execution
Packit 345191
        with the 
Packit 345191
        linkend="prof.active"><mallctl>prof.active</mallctl></link> mallctl.
Packit 345191
        This option is enabled by default.</para></listitem>
Packit 345191
      </varlistentry>
Packit 345191
Packit 345191
      <varlistentry id="opt.prof_thread_active_init">
Packit 345191
        <term>
Packit 345191
          <mallctl>opt.prof_thread_active_init</mallctl>
Packit 345191
          (<type>bool</type>)
Packit 345191
          <literal>r-</literal>
Packit 345191
          [<option>--enable-prof</option>]
Packit 345191
        </term>
Packit 345191
        <listitem><para>Initial setting for 
Packit 345191
        linkend="thread.prof.active"><mallctl>thread.prof.active</mallctl></link>
Packit 345191
        in newly created threads.  The initial setting for newly created threads
Packit 345191
        can also be changed during execution via the 
Packit 345191
        linkend="prof.thread_active_init"><mallctl>prof.thread_active_init</mallctl></link>
Packit 345191
        mallctl.  This option is enabled by default.</para></listitem>
Packit 345191
      </varlistentry>
Packit 345191
Packit 345191
      <varlistentry id="opt.lg_prof_sample">
Packit 345191
        <term>
Packit 345191
          <mallctl>opt.lg_prof_sample</mallctl>
Packit 345191
          (<type>size_t</type>)
Packit 345191
          <literal>r-</literal>
Packit 345191
          [<option>--enable-prof</option>]
Packit 345191
        </term>
Packit 345191
        <listitem><para>Average interval (log base 2) between allocation
Packit 345191
        samples, as measured in bytes of allocation activity.  Increasing the
Packit 345191
        sampling interval decreases profile fidelity, but also decreases the
Packit 345191
        computational overhead.  The default sample interval is 512 KiB (2^19
Packit 345191
        B).</para></listitem>
Packit 345191
      </varlistentry>
Packit 345191
Packit 345191
      <varlistentry id="opt.prof_accum">
Packit 345191
        <term>
Packit 345191
          <mallctl>opt.prof_accum</mallctl>
Packit 345191
          (<type>bool</type>)
Packit 345191
          <literal>r-</literal>
Packit 345191
          [<option>--enable-prof</option>]
Packit 345191
        </term>
Packit 345191
        <listitem><para>Reporting of cumulative object/byte counts in profile
Packit 345191
        dumps enabled/disabled.  If this option is enabled, every unique
Packit 345191
        backtrace must be stored for the duration of execution.  Depending on
Packit 345191
        the application, this can impose a large memory overhead, and the
Packit 345191
        cumulative counts are not always of interest.  This option is disabled
Packit 345191
        by default.</para></listitem>
Packit 345191
      </varlistentry>
Packit 345191
Packit 345191
      <varlistentry id="opt.lg_prof_interval">
Packit 345191
        <term>
Packit 345191
          <mallctl>opt.lg_prof_interval</mallctl>
Packit 345191
          (<type>ssize_t</type>)
Packit 345191
          <literal>r-</literal>
Packit 345191
          [<option>--enable-prof</option>]
Packit 345191
        </term>
Packit 345191
        <listitem><para>Average interval (log base 2) between memory profile
Packit 345191
        dumps, as measured in bytes of allocation activity.  The actual
Packit 345191
        interval between dumps may be sporadic because decentralized allocation
Packit 345191
        counters are used to avoid synchronization bottlenecks.  Profiles are
Packit 345191
        dumped to files named according to the pattern
Packit 345191
        <filename><prefix>.<pid>.<seq>.i<iseq>.heap</filename>,
Packit 345191
        where <literal><prefix></literal> is controlled by the
Packit 345191
        
Packit 345191
        linkend="opt.prof_prefix"><mallctl>opt.prof_prefix</mallctl></link>
Packit 345191
        option.  By default, interval-triggered profile dumping is disabled
Packit 345191
        (encoded as -1).
Packit 345191
        </para></listitem>
Packit 345191
      </varlistentry>
Packit 345191
Packit 345191
      <varlistentry id="opt.prof_gdump">
Packit 345191
        <term>
Packit 345191
          <mallctl>opt.prof_gdump</mallctl>
Packit 345191
          (<type>bool</type>)
Packit 345191
          <literal>r-</literal>
Packit 345191
          [<option>--enable-prof</option>]
Packit 345191
        </term>
Packit 345191
        <listitem><para>Set the initial state of 
Packit 345191
        linkend="prof.gdump"><mallctl>prof.gdump</mallctl></link>, which when
Packit 345191
        enabled triggers a memory profile dump every time the total virtual
Packit 345191
        memory exceeds the previous maximum.  This option is disabled by
Packit 345191
        default.</para></listitem>
Packit 345191
      </varlistentry>
Packit 345191
Packit 345191
      <varlistentry id="opt.prof_final">
Packit 345191
        <term>
Packit 345191
          <mallctl>opt.prof_final</mallctl>
Packit 345191
          (<type>bool</type>)
Packit 345191
          <literal>r-</literal>
Packit 345191
          [<option>--enable-prof</option>]
Packit 345191
        </term>
Packit 345191
        <listitem><para>Use an
Packit 345191
        <citerefentry><refentrytitle>atexit</refentrytitle>
Packit 345191
        <manvolnum>3</manvolnum></citerefentry> function to dump final memory
Packit 345191
        usage to a file named according to the pattern
Packit 345191
        <filename><prefix>.<pid>.<seq>.f.heap</filename>,
Packit 345191
        where <literal><prefix></literal> is controlled by the 
Packit 345191
        linkend="opt.prof_prefix"><mallctl>opt.prof_prefix</mallctl></link>
Packit 345191
        option.  Note that <function>atexit()</function> may allocate
Packit 345191
        memory during application initialization and then deadlock internally
Packit 345191
        when jemalloc in turn calls <function>atexit()</function>, so
Packit 345191
        this option is not universally usable (though the application can
Packit 345191
        register its own <function>atexit()</function> function with
Packit 345191
        equivalent functionality).  This option is disabled by
Packit 345191
        default.</para></listitem>
Packit 345191
      </varlistentry>
Packit 345191
Packit 345191
      <varlistentry id="opt.prof_leak">
Packit 345191
        <term>
Packit 345191
          <mallctl>opt.prof_leak</mallctl>
Packit 345191
          (<type>bool</type>)
Packit 345191
          <literal>r-</literal>
Packit 345191
          [<option>--enable-prof</option>]
Packit 345191
        </term>
Packit 345191
        <listitem><para>Leak reporting enabled/disabled.  If enabled, use an
Packit 345191
        <citerefentry><refentrytitle>atexit</refentrytitle>
Packit 345191
        <manvolnum>3</manvolnum></citerefentry> function to report memory leaks
Packit 345191
        detected by allocation sampling.  See the
Packit 345191
        <link linkend="opt.prof"><mallctl>opt.prof</mallctl></link> option for
Packit 345191
        information on analyzing heap profile output.  This option is disabled
Packit 345191
        by default.</para></listitem>
Packit 345191
      </varlistentry>
Packit 345191
Packit 345191
      <varlistentry id="thread.arena">
Packit 345191
        <term>
Packit 345191
          <mallctl>thread.arena</mallctl>
Packit 345191
          (<type>unsigned</type>)
Packit 345191
          <literal>rw</literal>
Packit 345191
        </term>
Packit 345191
        <listitem><para>Get or set the arena associated with the calling
Packit 345191
        thread.  If the specified arena was not initialized beforehand (see the
Packit 345191
        
Packit 345191
        linkend="arena.i.initialized"><mallctl>arena.i.initialized</mallctl></link>
Packit 345191
        mallctl), it will be automatically initialized as a side effect of
Packit 345191
        calling this interface.</para></listitem>
Packit 345191
      </varlistentry>
Packit 345191
Packit 345191
      <varlistentry id="thread.allocated">
Packit 345191
        <term>
Packit 345191
          <mallctl>thread.allocated</mallctl>
Packit 345191
          (<type>uint64_t</type>)
Packit 345191
          <literal>r-</literal>
Packit 345191
          [<option>--enable-stats</option>]
Packit 345191
        </term>
Packit 345191
        <listitem><para>Get the total number of bytes ever allocated by the
Packit 345191
        calling thread.  This counter has the potential to wrap around; it is
Packit 345191
        up to the application to appropriately interpret the counter in such
Packit 345191
        cases.</para></listitem>
Packit 345191
      </varlistentry>
Packit 345191
Packit 345191
      <varlistentry id="thread.allocatedp">
Packit 345191
        <term>
Packit 345191
          <mallctl>thread.allocatedp</mallctl>
Packit 345191
          (<type>uint64_t *</type>)
Packit 345191
          <literal>r-</literal>
Packit 345191
          [<option>--enable-stats</option>]
Packit 345191
        </term>
Packit 345191
        <listitem><para>Get a pointer to the the value that is returned by the
Packit 345191
        
Packit 345191
        linkend="thread.allocated"><mallctl>thread.allocated</mallctl></link>
Packit 345191
        mallctl.  This is useful for avoiding the overhead of repeated
Packit 345191
        <function>mallctl*()</function> calls.</para></listitem>
Packit 345191
      </varlistentry>
Packit 345191
Packit 345191
      <varlistentry id="thread.deallocated">
Packit 345191
        <term>
Packit 345191
          <mallctl>thread.deallocated</mallctl>
Packit 345191
          (<type>uint64_t</type>)
Packit 345191
          <literal>r-</literal>
Packit 345191
          [<option>--enable-stats</option>]
Packit 345191
        </term>
Packit 345191
        <listitem><para>Get the total number of bytes ever deallocated by the
Packit 345191
        calling thread.  This counter has the potential to wrap around; it is
Packit 345191
        up to the application to appropriately interpret the counter in such
Packit 345191
        cases.</para></listitem>
Packit 345191
      </varlistentry>
Packit 345191
Packit 345191
      <varlistentry id="thread.deallocatedp">
Packit 345191
        <term>
Packit 345191
          <mallctl>thread.deallocatedp</mallctl>
Packit 345191
          (<type>uint64_t *</type>)
Packit 345191
          <literal>r-</literal>
Packit 345191
          [<option>--enable-stats</option>]
Packit 345191
        </term>
Packit 345191
        <listitem><para>Get a pointer to the the value that is returned by the
Packit 345191
        
Packit 345191
        linkend="thread.deallocated"><mallctl>thread.deallocated</mallctl></link>
Packit 345191
        mallctl.  This is useful for avoiding the overhead of repeated
Packit 345191
        <function>mallctl*()</function> calls.</para></listitem>
Packit 345191
      </varlistentry>
Packit 345191
Packit 345191
      <varlistentry id="thread.tcache.enabled">
Packit 345191
        <term>
Packit 345191
          <mallctl>thread.tcache.enabled</mallctl>
Packit 345191
          (<type>bool</type>)
Packit 345191
          <literal>rw</literal>
Packit 345191
        </term>
Packit 345191
        <listitem><para>Enable/disable calling thread's tcache.  The tcache is
Packit 345191
        implicitly flushed as a side effect of becoming
Packit 345191
        disabled (see 
Packit 345191
        linkend="thread.tcache.flush"><mallctl>thread.tcache.flush</mallctl></link>).
Packit 345191
        </para></listitem>
Packit 345191
      </varlistentry>
Packit 345191
Packit 345191
      <varlistentry id="thread.tcache.flush">
Packit 345191
        <term>
Packit 345191
          <mallctl>thread.tcache.flush</mallctl>
Packit 345191
          (<type>void</type>)
Packit 345191
          <literal>--</literal>
Packit 345191
        </term>
Packit 345191
        <listitem><para>Flush calling thread's thread-specific cache (tcache).
Packit 345191
        This interface releases all cached objects and internal data structures
Packit 345191
        associated with the calling thread's tcache.  Ordinarily, this interface
Packit 345191
        need not be called, since automatic periodic incremental garbage
Packit 345191
        collection occurs, and the thread cache is automatically discarded when
Packit 345191
        a thread exits.  However, garbage collection is triggered by allocation
Packit 345191
        activity, so it is possible for a thread that stops
Packit 345191
        allocating/deallocating to retain its cache indefinitely, in which case
Packit 345191
        the developer may find manual flushing useful.</para></listitem>
Packit 345191
      </varlistentry>
Packit 345191
Packit 345191
      <varlistentry id="thread.prof.name">
Packit 345191
        <term>
Packit 345191
          <mallctl>thread.prof.name</mallctl>
Packit 345191
          (<type>const char *</type>)
Packit 345191
          <literal>r-</literal> or
Packit 345191
          <literal>-w</literal>
Packit 345191
          [<option>--enable-prof</option>]
Packit 345191
        </term>
Packit 345191
        <listitem><para>Get/set the descriptive name associated with the calling
Packit 345191
        thread in memory profile dumps.  An internal copy of the name string is
Packit 345191
        created, so the input string need not be maintained after this interface
Packit 345191
        completes execution.  The output string of this interface should be
Packit 345191
        copied for non-ephemeral uses, because multiple implementation details
Packit 345191
        can cause asynchronous string deallocation.  Furthermore, each
Packit 345191
        invocation of this interface can only read or write; simultaneous
Packit 345191
        read/write is not supported due to string lifetime limitations.  The
Packit 345191
        name string must be nil-terminated and comprised only of characters in
Packit 345191
        the sets recognized
Packit 345191
        by <citerefentry><refentrytitle>isgraph</refentrytitle>
Packit 345191
        <manvolnum>3</manvolnum></citerefentry> and
Packit 345191
        <citerefentry><refentrytitle>isblank</refentrytitle>
Packit 345191
        <manvolnum>3</manvolnum></citerefentry>.</para></listitem>
Packit 345191
      </varlistentry>
Packit 345191
Packit 345191
      <varlistentry id="thread.prof.active">
Packit 345191
        <term>
Packit 345191
          <mallctl>thread.prof.active</mallctl>
Packit 345191
          (<type>bool</type>)
Packit 345191
          <literal>rw</literal>
Packit 345191
          [<option>--enable-prof</option>]
Packit 345191
        </term>
Packit 345191
        <listitem><para>Control whether sampling is currently active for the
Packit 345191
        calling thread.  This is an activation mechanism in addition to 
Packit 345191
        linkend="prof.active"><mallctl>prof.active</mallctl></link>; both must
Packit 345191
        be active for the calling thread to sample.  This flag is enabled by
Packit 345191
        default.</para></listitem>
Packit 345191
      </varlistentry>
Packit 345191
Packit 345191
      <varlistentry id="tcache.create">
Packit 345191
        <term>
Packit 345191
          <mallctl>tcache.create</mallctl>
Packit 345191
          (<type>unsigned</type>)
Packit 345191
          <literal>r-</literal>
Packit 345191
        </term>
Packit 345191
        <listitem><para>Create an explicit thread-specific cache (tcache) and
Packit 345191
        return an identifier that can be passed to the 
Packit 345191
        linkend="MALLOCX_TCACHE"><constant>MALLOCX_TCACHE(<parameter>tc</parameter>)</constant></link>
Packit 345191
        macro to explicitly use the specified cache rather than the
Packit 345191
        automatically managed one that is used by default.  Each explicit cache
Packit 345191
        can be used by only one thread at a time; the application must assure
Packit 345191
        that this constraint holds.
Packit 345191
        </para></listitem>
Packit 345191
      </varlistentry>
Packit 345191
Packit 345191
      <varlistentry id="tcache.flush">
Packit 345191
        <term>
Packit 345191
          <mallctl>tcache.flush</mallctl>
Packit 345191
          (<type>unsigned</type>)
Packit 345191
          <literal>-w</literal>
Packit 345191
        </term>
Packit 345191
        <listitem><para>Flush the specified thread-specific cache (tcache).  The
Packit 345191
        same considerations apply to this interface as to 
Packit 345191
        linkend="thread.tcache.flush"><mallctl>thread.tcache.flush</mallctl></link>,
Packit 345191
        except that the tcache will never be automatically discarded.
Packit 345191
        </para></listitem>
Packit 345191
      </varlistentry>
Packit 345191
Packit 345191
      <varlistentry id="tcache.destroy">
Packit 345191
        <term>
Packit 345191
          <mallctl>tcache.destroy</mallctl>
Packit 345191
          (<type>unsigned</type>)
Packit 345191
          <literal>-w</literal>
Packit 345191
        </term>
Packit 345191
        <listitem><para>Flush the specified thread-specific cache (tcache) and
Packit 345191
        make the identifier available for use during a future tcache creation.
Packit 345191
        </para></listitem>
Packit 345191
      </varlistentry>
Packit 345191
Packit 345191
      <varlistentry id="arena.i.initialized">
Packit 345191
        <term>
Packit 345191
          <mallctl>arena.<i>.initialized</mallctl>
Packit 345191
          (<type>bool</type>)
Packit 345191
          <literal>r-</literal>
Packit 345191
        </term>
Packit 345191
        <listitem><para>Get whether the specified arena's statistics are
Packit 345191
        initialized (i.e. the arena was initialized prior to the current epoch).
Packit 345191
        This interface can also be nominally used to query whether the merged
Packit 345191
        statistics corresponding to <constant>MALLCTL_ARENAS_ALL</constant> are
Packit 345191
        initialized (always true).</para></listitem>
Packit 345191
      </varlistentry>
Packit 345191
Packit 345191
      <varlistentry id="arena.i.decay">
Packit 345191
        <term>
Packit 345191
          <mallctl>arena.<i>.decay</mallctl>
Packit 345191
          (<type>void</type>)
Packit 345191
          <literal>--</literal>
Packit 345191
        </term>
Packit 345191
        <listitem><para>Trigger decay-based purging of unused dirty/muzzy pages
Packit 345191
        for arena <i>, or for all arenas if <i> equals
Packit 345191
        <constant>MALLCTL_ARENAS_ALL</constant>.  The proportion of unused
Packit 345191
        dirty/muzzy pages to be purged depends on the current time; see 
Packit 345191
        linkend="opt.dirty_decay_ms"><mallctl>opt.dirty_decay_ms</mallctl></link>
Packit 345191
        and 
Packit 345191
        linkend="opt.muzzy_decay_ms"><mallctl>opt.muzy_decay_ms</mallctl></link>
Packit 345191
        for details.</para></listitem>
Packit 345191
      </varlistentry>
Packit 345191
Packit 345191
      <varlistentry id="arena.i.purge">
Packit 345191
        <term>
Packit 345191
          <mallctl>arena.<i>.purge</mallctl>
Packit 345191
          (<type>void</type>)
Packit 345191
          <literal>--</literal>
Packit 345191
        </term>
Packit 345191
        <listitem><para>Purge all unused dirty pages for arena <i>, or for
Packit 345191
        all arenas if <i> equals <constant>MALLCTL_ARENAS_ALL</constant>.
Packit 345191
        </para></listitem>
Packit 345191
      </varlistentry>
Packit 345191
Packit 345191
      <varlistentry id="arena.i.reset">
Packit 345191
        <term>
Packit 345191
          <mallctl>arena.<i>.reset</mallctl>
Packit 345191
          (<type>void</type>)
Packit 345191
          <literal>--</literal>
Packit 345191
        </term>
Packit 345191
        <listitem><para>Discard all of the arena's extant allocations.  This
Packit 345191
        interface can only be used with arenas explicitly created via 
Packit 345191
        linkend="arenas.create"><mallctl>arenas.create</mallctl></link>.  None
Packit 345191
        of the arena's discarded/cached allocations may accessed afterward.  As
Packit 345191
        part of this requirement, all thread caches which were used to
Packit 345191
        allocate/deallocate in conjunction with the arena must be flushed
Packit 345191
        beforehand.</para></listitem>
Packit 345191
      </varlistentry>
Packit 345191
Packit 345191
      <varlistentry id="arena.i.destroy">
Packit 345191
        <term>
Packit 345191
          <mallctl>arena.<i>.destroy</mallctl>
Packit 345191
          (<type>void</type>)
Packit 345191
          <literal>--</literal>
Packit 345191
        </term>
Packit 345191
        <listitem><para>Destroy the arena.  Discard all of the arena's extant
Packit 345191
        allocations using the same mechanism as for 
Packit 345191
        linkend="arena.i.reset"><mallctl>arena.<i>.reset</mallctl></link>
Packit 345191
        (with all the same constraints and side effects), merge the arena stats
Packit 345191
        into those accessible at arena index
Packit 345191
        <constant>MALLCTL_ARENAS_DESTROYED</constant>, and then completely
Packit 345191
        discard all metadata associated with the arena.  Future calls to 
Packit 345191
        linkend="arenas.create"><mallctl>arenas.create</mallctl></link> may
Packit 345191
        recycle the arena index.  Destruction will fail if any threads are
Packit 345191
        currently associated with the arena as a result of calls to 
Packit 345191
        linkend="thread.arena"><mallctl>thread.arena</mallctl></link>.</para></listitem>
Packit 345191
      </varlistentry>
Packit 345191
Packit 345191
      <varlistentry id="arena.i.dss">
Packit 345191
        <term>
Packit 345191
          <mallctl>arena.<i>.dss</mallctl>
Packit 345191
          (<type>const char *</type>)
Packit 345191
          <literal>rw</literal>
Packit 345191
        </term>
Packit 345191
        <listitem><para>Set the precedence of dss allocation as related to mmap
Packit 345191
        allocation for arena <i>, or for all arenas if <i> equals
Packit 345191
        <constant>MALLCTL_ARENAS_ALL</constant>.  See 
Packit 345191
        linkend="opt.dss"><mallctl>opt.dss</mallctl></link> for supported
Packit 345191
        settings.</para></listitem>
Packit 345191
      </varlistentry>
Packit 345191
Packit 345191
      <varlistentry id="arena.i.dirty_decay_ms">
Packit 345191
        <term>
Packit 345191
          <mallctl>arena.<i>.dirty_decay_ms</mallctl>
Packit 345191
          (<type>ssize_t</type>)
Packit 345191
          <literal>rw</literal>
Packit 345191
        </term>
Packit 345191
        <listitem><para>Current per-arena approximate time in milliseconds from
Packit 345191
        the creation of a set of unused dirty pages until an equivalent set of
Packit 345191
        unused dirty pages is purged and/or reused.  Each time this interface is
Packit 345191
        set, all currently unused dirty pages are considered to have fully
Packit 345191
        decayed, which causes immediate purging of all unused dirty pages unless
Packit 345191
        the decay time is set to -1 (i.e. purging disabled).  See 
Packit 345191
        linkend="opt.dirty_decay_ms"><mallctl>opt.dirty_decay_ms</mallctl></link>
Packit 345191
        for additional information.</para></listitem>
Packit 345191
      </varlistentry>
Packit 345191
Packit 345191
      <varlistentry id="arena.i.muzzy_decay_ms">
Packit 345191
        <term>
Packit 345191
          <mallctl>arena.<i>.muzzy_decay_ms</mallctl>
Packit 345191
          (<type>ssize_t</type>)
Packit 345191
          <literal>rw</literal>
Packit 345191
        </term>
Packit 345191
        <listitem><para>Current per-arena approximate time in milliseconds from
Packit 345191
        the creation of a set of unused muzzy pages until an equivalent set of
Packit 345191
        unused muzzy pages is purged and/or reused.  Each time this interface is
Packit 345191
        set, all currently unused muzzy pages are considered to have fully
Packit 345191
        decayed, which causes immediate purging of all unused muzzy pages unless
Packit 345191
        the decay time is set to -1 (i.e. purging disabled).  See 
Packit 345191
        linkend="opt.muzzy_decay_ms"><mallctl>opt.muzzy_decay_ms</mallctl></link>
Packit 345191
        for additional information.</para></listitem>
Packit 345191
      </varlistentry>
Packit 345191
Packit 345191
      <varlistentry id="arena.i.retain_grow_limit">
Packit 345191
        <term>
Packit 345191
          <mallctl>arena.<i>.retain_grow_limit</mallctl>
Packit 345191
          (<type>size_t</type>)
Packit 345191
          <literal>rw</literal>
Packit 345191
        </term>
Packit 345191
        <listitem><para>Maximum size to grow retained region (only relevant when
Packit 345191
        <link linkend="opt.retain"><mallctl>opt.retain</mallctl></link> is
Packit 345191
        enabled).  This controls the maximum increment to expand virtual memory,
Packit 345191
        or allocation through 
Packit 345191
        linkend="arena.i.extent_hooks"><mallctl>arena.<i>extent_hooks</mallctl></link>.
Packit 345191
        In particular, if customized extent hooks reserve physical memory
Packit 345191
        (e.g. 1G huge pages), this is useful to control the allocation hook's
Packit 345191
        input size.  The default is no limit.</para></listitem>
Packit 345191
      </varlistentry>
Packit 345191
Packit 345191
      <varlistentry id="arena.i.extent_hooks">
Packit 345191
        <term>
Packit 345191
          <mallctl>arena.<i>.extent_hooks</mallctl>
Packit 345191
          (<type>extent_hooks_t *</type>)
Packit 345191
          <literal>rw</literal>
Packit 345191
        </term>
Packit 345191
        <listitem><para>Get or set the extent management hook functions for
Packit 345191
        arena <i>.  The functions must be capable of operating on all
Packit 345191
        extant extents associated with arena <i>, usually by passing
Packit 345191
        unknown extents to the replaced functions.  In practice, it is feasible
Packit 345191
        to control allocation for arenas explicitly created via 
Packit 345191
        linkend="arenas.create"><mallctl>arenas.create</mallctl></link> such
Packit 345191
        that all extents originate from an application-supplied extent allocator
Packit 345191
        (by specifying the custom extent hook functions during arena creation).
Packit 345191
        However, the API guarantees for the automatically created arenas may be
Packit 345191
        relaxed -- hooks set there may be called in a "best effort" fashion; in
Packit 345191
        addition there may be extents created prior to the application having an
Packit 345191
        opportunity to take over extent allocation.</para>
Packit 345191
Packit 345191
        <programlisting language="C">
Packit 345191
typedef extent_hooks_s extent_hooks_t;
Packit 345191
struct extent_hooks_s {
Packit 345191
	extent_alloc_t		*alloc;
Packit 345191
	extent_dalloc_t		*dalloc;
Packit 345191
	extent_destroy_t	*destroy;
Packit 345191
	extent_commit_t		*commit;
Packit 345191
	extent_decommit_t	*decommit;
Packit 345191
	extent_purge_t		*purge_lazy;
Packit 345191
	extent_purge_t		*purge_forced;
Packit 345191
	extent_split_t		*split;
Packit 345191
	extent_merge_t		*merge;
Packit 345191
};]]></programlisting>
Packit 345191
        <para>The <type>extent_hooks_t</type> structure comprises function
Packit 345191
        pointers which are described individually below.  jemalloc uses these
Packit 345191
        functions to manage extent lifetime, which starts off with allocation of
Packit 345191
        mapped committed memory, in the simplest case followed by deallocation.
Packit 345191
        However, there are performance and platform reasons to retain extents
Packit 345191
        for later reuse.  Cleanup attempts cascade from deallocation to decommit
Packit 345191
        to forced purging to lazy purging, which gives the extent management
Packit 345191
        functions opportunities to reject the most permanent cleanup operations
Packit 345191
        in favor of less permanent (and often less costly) operations.  All
Packit 345191
        operations except allocation can be universally opted out of by setting
Packit 345191
        the hook pointers to <constant>NULL</constant>, or selectively opted out
Packit 345191
        of by returning failure.  Note that once the extent hook is set, the
Packit 345191
        structure is accessed directly by the associated arenas, so it must
Packit 345191
        remain valid for the entire lifetime of the arenas.</para>
Packit 345191
Packit 345191
        <funcsynopsis><funcprototype>
Packit 345191
          <funcdef>typedef void *<function>(extent_alloc_t)</function></funcdef>
Packit 345191
          <paramdef>extent_hooks_t *<parameter>extent_hooks</parameter></paramdef>
Packit 345191
          <paramdef>void *<parameter>new_addr</parameter></paramdef>
Packit 345191
          <paramdef>size_t <parameter>size</parameter></paramdef>
Packit 345191
          <paramdef>size_t <parameter>alignment</parameter></paramdef>
Packit 345191
          <paramdef>bool *<parameter>zero</parameter></paramdef>
Packit 345191
          <paramdef>bool *<parameter>commit</parameter></paramdef>
Packit 345191
          <paramdef>unsigned <parameter>arena_ind</parameter></paramdef>
Packit 345191
        </funcprototype></funcsynopsis>
Packit 345191
        <literallayout></literallayout>
Packit 345191
        <para>An extent allocation function conforms to the
Packit 345191
        <type>extent_alloc_t</type> type and upon success returns a pointer to
Packit 345191
        <parameter>size</parameter> bytes of mapped memory on behalf of arena
Packit 345191
        <parameter>arena_ind</parameter> such that the extent's base address is
Packit 345191
        a multiple of <parameter>alignment</parameter>, as well as setting
Packit 345191
        <parameter>*zero</parameter> to indicate whether the extent is zeroed
Packit 345191
        and <parameter>*commit</parameter> to indicate whether the extent is
Packit 345191
        committed.  Upon error the function returns <constant>NULL</constant>
Packit 345191
        and leaves <parameter>*zero</parameter> and
Packit 345191
        <parameter>*commit</parameter> unmodified.  The
Packit 345191
        <parameter>size</parameter> parameter is always a multiple of the page
Packit 345191
        size.  The <parameter>alignment</parameter> parameter is always a power
Packit 345191
        of two at least as large as the page size.  Zeroing is mandatory if
Packit 345191
        <parameter>*zero</parameter> is true upon function entry.  Committing is
Packit 345191
        mandatory if <parameter>*commit</parameter> is true upon function entry.
Packit 345191
        If <parameter>new_addr</parameter> is not <constant>NULL</constant>, the
Packit 345191
        returned pointer must be <parameter>new_addr</parameter> on success or
Packit 345191
        <constant>NULL</constant> on error.  Committed memory may be committed
Packit 345191
        in absolute terms as on a system that does not overcommit, or in
Packit 345191
        implicit terms as on a system that overcommits and satisfies physical
Packit 345191
        memory needs on demand via soft page faults.  Note that replacing the
Packit 345191
        default extent allocation function makes the arena's 
Packit 345191
        linkend="arena.i.dss"><mallctl>arena.<i>.dss</mallctl></link>
Packit 345191
        setting irrelevant.</para>
Packit 345191
Packit 345191
        <funcsynopsis><funcprototype>
Packit 345191
          <funcdef>typedef bool <function>(extent_dalloc_t)</function></funcdef>
Packit 345191
          <paramdef>extent_hooks_t *<parameter>extent_hooks</parameter></paramdef>
Packit 345191
          <paramdef>void *<parameter>addr</parameter></paramdef>
Packit 345191
          <paramdef>size_t <parameter>size</parameter></paramdef>
Packit 345191
          <paramdef>bool <parameter>committed</parameter></paramdef>
Packit 345191
          <paramdef>unsigned <parameter>arena_ind</parameter></paramdef>
Packit 345191
        </funcprototype></funcsynopsis>
Packit 345191
        <literallayout></literallayout>
Packit 345191
        <para>
Packit 345191
        An extent deallocation function conforms to the
Packit 345191
        <type>extent_dalloc_t</type> type and deallocates an extent at given
Packit 345191
        <parameter>addr</parameter> and <parameter>size</parameter> with
Packit 345191
        <parameter>committed</parameter>/decommited memory as indicated, on
Packit 345191
        behalf of arena <parameter>arena_ind</parameter>, returning false upon
Packit 345191
        success.  If the function returns true, this indicates opt-out from
Packit 345191
        deallocation; the virtual memory mapping associated with the extent
Packit 345191
        remains mapped, in the same commit state, and available for future use,
Packit 345191
        in which case it will be automatically retained for later reuse.</para>
Packit 345191
Packit 345191
        <funcsynopsis><funcprototype>
Packit 345191
          <funcdef>typedef void <function>(extent_destroy_t)</function></funcdef>
Packit 345191
          <paramdef>extent_hooks_t *<parameter>extent_hooks</parameter></paramdef>
Packit 345191
          <paramdef>void *<parameter>addr</parameter></paramdef>
Packit 345191
          <paramdef>size_t <parameter>size</parameter></paramdef>
Packit 345191
          <paramdef>bool <parameter>committed</parameter></paramdef>
Packit 345191
          <paramdef>unsigned <parameter>arena_ind</parameter></paramdef>
Packit 345191
        </funcprototype></funcsynopsis>
Packit 345191
        <literallayout></literallayout>
Packit 345191
        <para>
Packit 345191
        An extent destruction function conforms to the
Packit 345191
        <type>extent_destroy_t</type> type and unconditionally destroys an
Packit 345191
        extent at given <parameter>addr</parameter> and
Packit 345191
        <parameter>size</parameter> with
Packit 345191
        <parameter>committed</parameter>/decommited memory as indicated, on
Packit 345191
        behalf of arena <parameter>arena_ind</parameter>.  This function may be
Packit 345191
        called to destroy retained extents during arena destruction (see 
Packit 345191
        linkend="arena.i.destroy"><mallctl>arena.<i>.destroy</mallctl></link>).</para>
Packit 345191
Packit 345191
        <funcsynopsis><funcprototype>
Packit 345191
          <funcdef>typedef bool <function>(extent_commit_t)</function></funcdef>
Packit 345191
          <paramdef>extent_hooks_t *<parameter>extent_hooks</parameter></paramdef>
Packit 345191
          <paramdef>void *<parameter>addr</parameter></paramdef>
Packit 345191
          <paramdef>size_t <parameter>size</parameter></paramdef>
Packit 345191
          <paramdef>size_t <parameter>offset</parameter></paramdef>
Packit 345191
          <paramdef>size_t <parameter>length</parameter></paramdef>
Packit 345191
          <paramdef>unsigned <parameter>arena_ind</parameter></paramdef>
Packit 345191
        </funcprototype></funcsynopsis>
Packit 345191
        <literallayout></literallayout>
Packit 345191
        <para>An extent commit function conforms to the
Packit 345191
        <type>extent_commit_t</type> type and commits zeroed physical memory to
Packit 345191
        back pages within an extent at given <parameter>addr</parameter> and
Packit 345191
        <parameter>size</parameter> at <parameter>offset</parameter> bytes,
Packit 345191
        extending for <parameter>length</parameter> on behalf of arena
Packit 345191
        <parameter>arena_ind</parameter>, returning false upon success.
Packit 345191
        Committed memory may be committed in absolute terms as on a system that
Packit 345191
        does not overcommit, or in implicit terms as on a system that
Packit 345191
        overcommits and satisfies physical memory needs on demand via soft page
Packit 345191
        faults. If the function returns true, this indicates insufficient
Packit 345191
        physical memory to satisfy the request.</para>
Packit 345191
Packit 345191
        <funcsynopsis><funcprototype>
Packit 345191
          <funcdef>typedef bool <function>(extent_decommit_t)</function></funcdef>
Packit 345191
          <paramdef>extent_hooks_t *<parameter>extent_hooks</parameter></paramdef>
Packit 345191
          <paramdef>void *<parameter>addr</parameter></paramdef>
Packit 345191
          <paramdef>size_t <parameter>size</parameter></paramdef>
Packit 345191
          <paramdef>size_t <parameter>offset</parameter></paramdef>
Packit 345191
          <paramdef>size_t <parameter>length</parameter></paramdef>
Packit 345191
          <paramdef>unsigned <parameter>arena_ind</parameter></paramdef>
Packit 345191
        </funcprototype></funcsynopsis>
Packit 345191
        <literallayout></literallayout>
Packit 345191
        <para>An extent decommit function conforms to the
Packit 345191
        <type>extent_decommit_t</type> type and decommits any physical memory
Packit 345191
        that is backing pages within an extent at given
Packit 345191
        <parameter>addr</parameter> and <parameter>size</parameter> at
Packit 345191
        <parameter>offset</parameter> bytes, extending for
Packit 345191
        <parameter>length</parameter> on behalf of arena
Packit 345191
        <parameter>arena_ind</parameter>, returning false upon success, in which
Packit 345191
        case the pages will be committed via the extent commit function before
Packit 345191
        being reused.  If the function returns true, this indicates opt-out from
Packit 345191
        decommit; the memory remains committed and available for future use, in
Packit 345191
        which case it will be automatically retained for later reuse.</para>
Packit 345191
Packit 345191
        <funcsynopsis><funcprototype>
Packit 345191
          <funcdef>typedef bool <function>(extent_purge_t)</function></funcdef>
Packit 345191
          <paramdef>extent_hooks_t *<parameter>extent_hooks</parameter></paramdef>
Packit 345191
          <paramdef>void *<parameter>addr</parameter></paramdef>
Packit 345191
          <paramdef>size_t <parameter>size</parameter></paramdef>
Packit 345191
          <paramdef>size_t <parameter>offset</parameter></paramdef>
Packit 345191
          <paramdef>size_t <parameter>length</parameter></paramdef>
Packit 345191
          <paramdef>unsigned <parameter>arena_ind</parameter></paramdef>
Packit 345191
        </funcprototype></funcsynopsis>
Packit 345191
        <literallayout></literallayout>
Packit 345191
        <para>An extent purge function conforms to the
Packit 345191
        <type>extent_purge_t</type> type and discards physical pages
Packit 345191
        within the virtual memory mapping associated with an extent at given
Packit 345191
        <parameter>addr</parameter> and <parameter>size</parameter> at
Packit 345191
        <parameter>offset</parameter> bytes, extending for
Packit 345191
        <parameter>length</parameter> on behalf of arena
Packit 345191
        <parameter>arena_ind</parameter>.  A lazy extent purge function (e.g.
Packit 345191
        implemented via
Packit 345191
        <function>madvise(<parameter>...</parameter><parameter><constant>MADV_FREE</constant></parameter>)</function>)
Packit 345191
        can delay purging indefinitely and leave the pages within the purged
Packit 345191
        virtual memory range in an indeterminite state, whereas a forced extent
Packit 345191
        purge function immediately purges, and the pages within the virtual
Packit 345191
        memory range will be zero-filled the next time they are accessed.  If
Packit 345191
        the function returns true, this indicates failure to purge.</para>
Packit 345191
Packit 345191
        <funcsynopsis><funcprototype>
Packit 345191
          <funcdef>typedef bool <function>(extent_split_t)</function></funcdef>
Packit 345191
          <paramdef>extent_hooks_t *<parameter>extent_hooks</parameter></paramdef>
Packit 345191
          <paramdef>void *<parameter>addr</parameter></paramdef>
Packit 345191
          <paramdef>size_t <parameter>size</parameter></paramdef>
Packit 345191
          <paramdef>size_t <parameter>size_a</parameter></paramdef>
Packit 345191
          <paramdef>size_t <parameter>size_b</parameter></paramdef>
Packit 345191
          <paramdef>bool <parameter>committed</parameter></paramdef>
Packit 345191
          <paramdef>unsigned <parameter>arena_ind</parameter></paramdef>
Packit 345191
        </funcprototype></funcsynopsis>
Packit 345191
        <literallayout></literallayout>
Packit 345191
        <para>An extent split function conforms to the
Packit 345191
        <type>extent_split_t</type> type and optionally splits an extent at
Packit 345191
        given <parameter>addr</parameter> and <parameter>size</parameter> into
Packit 345191
        two adjacent extents, the first of <parameter>size_a</parameter> bytes,
Packit 345191
        and the second of <parameter>size_b</parameter> bytes, operating on
Packit 345191
        <parameter>committed</parameter>/decommitted memory as indicated, on
Packit 345191
        behalf of arena <parameter>arena_ind</parameter>, returning false upon
Packit 345191
        success.  If the function returns true, this indicates that the extent
Packit 345191
        remains unsplit and therefore should continue to be operated on as a
Packit 345191
        whole.</para>
Packit 345191
Packit 345191
        <funcsynopsis><funcprototype>
Packit 345191
          <funcdef>typedef bool <function>(extent_merge_t)</function></funcdef>
Packit 345191
          <paramdef>extent_hooks_t *<parameter>extent_hooks</parameter></paramdef>
Packit 345191
          <paramdef>void *<parameter>addr_a</parameter></paramdef>
Packit 345191
          <paramdef>size_t <parameter>size_a</parameter></paramdef>
Packit 345191
          <paramdef>void *<parameter>addr_b</parameter></paramdef>
Packit 345191
          <paramdef>size_t <parameter>size_b</parameter></paramdef>
Packit 345191
          <paramdef>bool <parameter>committed</parameter></paramdef>
Packit 345191
          <paramdef>unsigned <parameter>arena_ind</parameter></paramdef>
Packit 345191
        </funcprototype></funcsynopsis>
Packit 345191
        <literallayout></literallayout>
Packit 345191
        <para>An extent merge function conforms to the
Packit 345191
        <type>extent_merge_t</type> type and optionally merges adjacent extents,
Packit 345191
        at given <parameter>addr_a</parameter> and <parameter>size_a</parameter>
Packit 345191
        with given <parameter>addr_b</parameter> and
Packit 345191
        <parameter>size_b</parameter> into one contiguous extent, operating on
Packit 345191
        <parameter>committed</parameter>/decommitted memory as indicated, on
Packit 345191
        behalf of arena <parameter>arena_ind</parameter>, returning false upon
Packit 345191
        success.  If the function returns true, this indicates that the extents
Packit 345191
        remain distinct mappings and therefore should continue to be operated on
Packit 345191
        independently.</para>
Packit 345191
        </listitem>
Packit 345191
      </varlistentry>
Packit 345191
Packit 345191
      <varlistentry id="arenas.narenas">
Packit 345191
        <term>
Packit 345191
          <mallctl>arenas.narenas</mallctl>
Packit 345191
          (<type>unsigned</type>)
Packit 345191
          <literal>r-</literal>
Packit 345191
        </term>
Packit 345191
        <listitem><para>Current limit on number of arenas.</para></listitem>
Packit 345191
      </varlistentry>
Packit 345191
Packit 345191
      <varlistentry id="arenas.dirty_decay_ms">
Packit 345191
        <term>
Packit 345191
          <mallctl>arenas.dirty_decay_ms</mallctl>
Packit 345191
          (<type>ssize_t</type>)
Packit 345191
          <literal>rw</literal>
Packit 345191
        </term>
Packit 345191
        <listitem><para>Current default per-arena approximate time in
Packit 345191
        milliseconds from the creation of a set of unused dirty pages until an
Packit 345191
        equivalent set of unused dirty pages is purged and/or reused, used to
Packit 345191
        initialize 
Packit 345191
        linkend="arena.i.dirty_decay_ms"><mallctl>arena.<i>.dirty_decay_ms</mallctl></link>
Packit 345191
        during arena creation.  See 
Packit 345191
        linkend="opt.dirty_decay_ms"><mallctl>opt.dirty_decay_ms</mallctl></link>
Packit 345191
        for additional information.</para></listitem>
Packit 345191
      </varlistentry>
Packit 345191
Packit 345191
      <varlistentry id="arenas.muzzy_decay_ms">
Packit 345191
        <term>
Packit 345191
          <mallctl>arenas.muzzy_decay_ms</mallctl>
Packit 345191
          (<type>ssize_t</type>)
Packit 345191
          <literal>rw</literal>
Packit 345191
        </term>
Packit 345191
        <listitem><para>Current default per-arena approximate time in
Packit 345191
        milliseconds from the creation of a set of unused muzzy pages until an
Packit 345191
        equivalent set of unused muzzy pages is purged and/or reused, used to
Packit 345191
        initialize 
Packit 345191
        linkend="arena.i.muzzy_decay_ms"><mallctl>arena.<i>.muzzy_decay_ms</mallctl></link>
Packit 345191
        during arena creation.  See 
Packit 345191
        linkend="opt.muzzy_decay_ms"><mallctl>opt.muzzy_decay_ms</mallctl></link>
Packit 345191
        for additional information.</para></listitem>
Packit 345191
      </varlistentry>
Packit 345191
Packit 345191
      <varlistentry id="arenas.quantum">
Packit 345191
        <term>
Packit 345191
          <mallctl>arenas.quantum</mallctl>
Packit 345191
          (<type>size_t</type>)
Packit 345191
          <literal>r-</literal>
Packit 345191
        </term>
Packit 345191
        <listitem><para>Quantum size.</para></listitem>
Packit 345191
      </varlistentry>
Packit 345191
Packit 345191
      <varlistentry id="arenas.page">
Packit 345191
        <term>
Packit 345191
          <mallctl>arenas.page</mallctl>
Packit 345191
          (<type>size_t</type>)
Packit 345191
          <literal>r-</literal>
Packit 345191
        </term>
Packit 345191
        <listitem><para>Page size.</para></listitem>
Packit 345191
      </varlistentry>
Packit 345191
Packit 345191
      <varlistentry id="arenas.tcache_max">
Packit 345191
        <term>
Packit 345191
          <mallctl>arenas.tcache_max</mallctl>
Packit 345191
          (<type>size_t</type>)
Packit 345191
          <literal>r-</literal>
Packit 345191
        </term>
Packit 345191
        <listitem><para>Maximum thread-cached size class.</para></listitem>
Packit 345191
      </varlistentry>
Packit 345191
Packit 345191
      <varlistentry id="arenas.nbins">
Packit 345191
        <term>
Packit 345191
          <mallctl>arenas.nbins</mallctl>
Packit 345191
          (<type>unsigned</type>)
Packit 345191
          <literal>r-</literal>
Packit 345191
        </term>
Packit 345191
        <listitem><para>Number of bin size classes.</para></listitem>
Packit 345191
      </varlistentry>
Packit 345191
Packit 345191
      <varlistentry id="arenas.nhbins">
Packit 345191
        <term>
Packit 345191
          <mallctl>arenas.nhbins</mallctl>
Packit 345191
          (<type>unsigned</type>)
Packit 345191
          <literal>r-</literal>
Packit 345191
        </term>
Packit 345191
        <listitem><para>Total number of thread cache bin size
Packit 345191
        classes.</para></listitem>
Packit 345191
      </varlistentry>
Packit 345191
Packit 345191
      <varlistentry id="arenas.bin.i.size">
Packit 345191
        <term>
Packit 345191
          <mallctl>arenas.bin.<i>.size</mallctl>
Packit 345191
          (<type>size_t</type>)
Packit 345191
          <literal>r-</literal>
Packit 345191
        </term>
Packit 345191
        <listitem><para>Maximum size supported by size class.</para></listitem>
Packit 345191
      </varlistentry>
Packit 345191
Packit 345191
      <varlistentry id="arenas.bin.i.nregs">
Packit 345191
        <term>
Packit 345191
          <mallctl>arenas.bin.<i>.nregs</mallctl>
Packit 345191
          (<type>uint32_t</type>)
Packit 345191
          <literal>r-</literal>
Packit 345191
        </term>
Packit 345191
        <listitem><para>Number of regions per slab.</para></listitem>
Packit 345191
      </varlistentry>
Packit 345191
Packit 345191
      <varlistentry id="arenas.bin.i.slab_size">
Packit 345191
        <term>
Packit 345191
          <mallctl>arenas.bin.<i>.slab_size</mallctl>
Packit 345191
          (<type>size_t</type>)
Packit 345191
          <literal>r-</literal>
Packit 345191
        </term>
Packit 345191
        <listitem><para>Number of bytes per slab.</para></listitem>
Packit 345191
      </varlistentry>
Packit 345191
Packit 345191
      <varlistentry id="arenas.nlextents">
Packit 345191
        <term>
Packit 345191
          <mallctl>arenas.nlextents</mallctl>
Packit 345191
          (<type>unsigned</type>)
Packit 345191
          <literal>r-</literal>
Packit 345191
        </term>
Packit 345191
        <listitem><para>Total number of large size classes.</para></listitem>
Packit 345191
      </varlistentry>
Packit 345191
Packit 345191
      <varlistentry id="arenas.lextent.i.size">
Packit 345191
        <term>
Packit 345191
          <mallctl>arenas.lextent.<i>.size</mallctl>
Packit 345191
          (<type>size_t</type>)
Packit 345191
          <literal>r-</literal>
Packit 345191
        </term>
Packit 345191
        <listitem><para>Maximum size supported by this large size
Packit 345191
        class.</para></listitem>
Packit 345191
      </varlistentry>
Packit 345191
Packit 345191
      <varlistentry id="arenas.create">
Packit 345191
        <term>
Packit 345191
          <mallctl>arenas.create</mallctl>
Packit 345191
          (<type>unsigned</type>, <type>extent_hooks_t *</type>)
Packit 345191
          <literal>rw</literal>
Packit 345191
        </term>
Packit 345191
        <listitem><para>Explicitly create a new arena outside the range of
Packit 345191
        automatically managed arenas, with optionally specified extent hooks,
Packit 345191
        and return the new arena index.</para></listitem>
Packit 345191
      </varlistentry>
Packit 345191
Packit 345191
      <varlistentry id="arenas.lookup">
Packit 345191
        <term>
Packit 345191
          <mallctl>arenas.lookup</mallctl>
Packit 345191
          (<type>unsigned</type>, <type>void*</type>)
Packit 345191
          <literal>rw</literal>
Packit 345191
        </term>
Packit 345191
        <listitem><para>Index of the arena to which an allocation belongs to.</para></listitem>
Packit 345191
      </varlistentry>
Packit 345191
Packit 345191
      <varlistentry id="prof.thread_active_init">
Packit 345191
        <term>
Packit 345191
          <mallctl>prof.thread_active_init</mallctl>
Packit 345191
          (<type>bool</type>)
Packit 345191
          <literal>rw</literal>
Packit 345191
          [<option>--enable-prof</option>]
Packit 345191
        </term>
Packit 345191
        <listitem><para>Control the initial setting for 
Packit 345191
        linkend="thread.prof.active"><mallctl>thread.prof.active</mallctl></link>
Packit 345191
        in newly created threads.  See the 
Packit 345191
        linkend="opt.prof_thread_active_init"><mallctl>opt.prof_thread_active_init</mallctl></link>
Packit 345191
        option for additional information.</para></listitem>
Packit 345191
      </varlistentry>
Packit 345191
Packit 345191
      <varlistentry id="prof.active">
Packit 345191
        <term>
Packit 345191
          <mallctl>prof.active</mallctl>
Packit 345191
          (<type>bool</type>)
Packit 345191
          <literal>rw</literal>
Packit 345191
          [<option>--enable-prof</option>]
Packit 345191
        </term>
Packit 345191
        <listitem><para>Control whether sampling is currently active.  See the
Packit 345191
        
Packit 345191
        linkend="opt.prof_active"><mallctl>opt.prof_active</mallctl></link>
Packit 345191
        option for additional information, as well as the interrelated 
Packit 345191
        linkend="thread.prof.active"><mallctl>thread.prof.active</mallctl></link>
Packit 345191
        mallctl.</para></listitem>
Packit 345191
      </varlistentry>
Packit 345191
Packit 345191
      <varlistentry id="prof.dump">
Packit 345191
        <term>
Packit 345191
          <mallctl>prof.dump</mallctl>
Packit 345191
          (<type>const char *</type>)
Packit 345191
          <literal>-w</literal>
Packit 345191
          [<option>--enable-prof</option>]
Packit 345191
        </term>
Packit 345191
        <listitem><para>Dump a memory profile to the specified file, or if NULL
Packit 345191
        is specified, to a file according to the pattern
Packit 345191
        <filename><prefix>.<pid>.<seq>.m<mseq>.heap</filename>,
Packit 345191
        where <literal><prefix></literal> is controlled by the
Packit 345191
        
Packit 345191
        linkend="opt.prof_prefix"><mallctl>opt.prof_prefix</mallctl></link>
Packit 345191
        option.</para></listitem>
Packit 345191
      </varlistentry>
Packit 345191
Packit 345191
      <varlistentry id="prof.gdump">
Packit 345191
        <term>
Packit 345191
          <mallctl>prof.gdump</mallctl>
Packit 345191
          (<type>bool</type>)
Packit 345191
          <literal>rw</literal>
Packit 345191
          [<option>--enable-prof</option>]
Packit 345191
        </term>
Packit 345191
        <listitem><para>When enabled, trigger a memory profile dump every time
Packit 345191
        the total virtual memory exceeds the previous maximum.  Profiles are
Packit 345191
        dumped to files named according to the pattern
Packit 345191
        <filename><prefix>.<pid>.<seq>.u<useq>.heap</filename>,
Packit 345191
        where <literal><prefix></literal> is controlled by the 
Packit 345191
        linkend="opt.prof_prefix"><mallctl>opt.prof_prefix</mallctl></link>
Packit 345191
        option.</para></listitem>
Packit 345191
      </varlistentry>
Packit 345191
Packit 345191
      <varlistentry id="prof.reset">
Packit 345191
        <term>
Packit 345191
          <mallctl>prof.reset</mallctl>
Packit 345191
          (<type>size_t</type>)
Packit 345191
          <literal>-w</literal>
Packit 345191
          [<option>--enable-prof</option>]
Packit 345191
        </term>
Packit 345191
        <listitem><para>Reset all memory profile statistics, and optionally
Packit 345191
        update the sample rate (see 
Packit 345191
        linkend="opt.lg_prof_sample"><mallctl>opt.lg_prof_sample</mallctl></link>
Packit 345191
        and 
Packit 345191
        linkend="prof.lg_sample"><mallctl>prof.lg_sample</mallctl></link>).
Packit 345191
        </para></listitem>
Packit 345191
      </varlistentry>
Packit 345191
Packit 345191
      <varlistentry id="prof.lg_sample">
Packit 345191
        <term>
Packit 345191
          <mallctl>prof.lg_sample</mallctl>
Packit 345191
          (<type>size_t</type>)
Packit 345191
          <literal>r-</literal>
Packit 345191
          [<option>--enable-prof</option>]
Packit 345191
        </term>
Packit 345191
        <listitem><para>Get the current sample rate (see 
Packit 345191
        linkend="opt.lg_prof_sample"><mallctl>opt.lg_prof_sample</mallctl></link>).
Packit 345191
        </para></listitem>
Packit 345191
      </varlistentry>
Packit 345191
Packit 345191
      <varlistentry id="prof.interval">
Packit 345191
        <term>
Packit 345191
          <mallctl>prof.interval</mallctl>
Packit 345191
          (<type>uint64_t</type>)
Packit 345191
          <literal>r-</literal>
Packit 345191
          [<option>--enable-prof</option>]
Packit 345191
        </term>
Packit 345191
        <listitem><para>Average number of bytes allocated between
Packit 345191
        interval-based profile dumps.  See the
Packit 345191
        
Packit 345191
        linkend="opt.lg_prof_interval"><mallctl>opt.lg_prof_interval</mallctl></link>
Packit 345191
        option for additional information.</para></listitem>
Packit 345191
      </varlistentry>
Packit 345191
Packit 345191
      <varlistentry id="stats.allocated">
Packit 345191
        <term>
Packit 345191
          <mallctl>stats.allocated</mallctl>
Packit 345191
          (<type>size_t</type>)
Packit 345191
          <literal>r-</literal>
Packit 345191
          [<option>--enable-stats</option>]
Packit 345191
        </term>
Packit 345191
        <listitem><para>Total number of bytes allocated by the
Packit 345191
        application.</para></listitem>
Packit 345191
      </varlistentry>
Packit 345191
Packit 345191
      <varlistentry id="stats.active">
Packit 345191
        <term>
Packit 345191
          <mallctl>stats.active</mallctl>
Packit 345191
          (<type>size_t</type>)
Packit 345191
          <literal>r-</literal>
Packit 345191
          [<option>--enable-stats</option>]
Packit 345191
        </term>
Packit 345191
        <listitem><para>Total number of bytes in active pages allocated by the
Packit 345191
        application.  This is a multiple of the page size, and greater than or
Packit 345191
        equal to 
Packit 345191
        linkend="stats.allocated"><mallctl>stats.allocated</mallctl></link>.
Packit 345191
        This does not include <link linkend="stats.arenas.i.pdirty">
Packit 345191
        <mallctl>stats.arenas.<i>.pdirty</mallctl></link>,
Packit 345191
        <link linkend="stats.arenas.i.pmuzzy">
Packit 345191
        <mallctl>stats.arenas.<i>.pmuzzy</mallctl></link>, nor pages
Packit 345191
        entirely devoted to allocator metadata.</para></listitem>
Packit 345191
      </varlistentry>
Packit 345191
Packit 345191
      <varlistentry id="stats.metadata">
Packit 345191
        <term>
Packit 345191
          <mallctl>stats.metadata</mallctl>
Packit 345191
          (<type>size_t</type>)
Packit 345191
          <literal>r-</literal>
Packit 345191
          [<option>--enable-stats</option>]
Packit 345191
        </term>
Packit 345191
        <listitem><para>Total number of bytes dedicated to metadata, which
Packit 345191
        comprise base allocations used for bootstrap-sensitive allocator
Packit 345191
        metadata structures (see 
Packit 345191
        linkend="stats.arenas.i.base"><mallctl>stats.arenas.<i>.base</mallctl></link>)
Packit 345191
        and internal allocations (see 
Packit 345191
        linkend="stats.arenas.i.internal"><mallctl>stats.arenas.<i>.internal</mallctl></link>).
Packit 345191
        Transparent huge page (enabled with 
Packit 345191
        linkend="opt.metadata_thp">opt.metadata_thp</link>) usage is not
Packit 345191
        considered.</para></listitem>
Packit 345191
      </varlistentry>
Packit 345191
Packit 345191
      <varlistentry id="stats.metadata_thp">
Packit 345191
        <term>
Packit 345191
          <mallctl>stats.metadata_thp</mallctl>
Packit 345191
          (<type>size_t</type>)
Packit 345191
          <literal>r-</literal>
Packit 345191
          [<option>--enable-stats</option>]
Packit 345191
        </term>
Packit 345191
        <listitem><para>Number of transparent huge pages (THP) used for
Packit 345191
        metadata.  See 
Packit 345191
        linkend="stats.metadata"><mallctl>stats.metadata</mallctl></link> and
Packit 345191
        <link linkend="opt.metadata_thp">opt.metadata_thp</link>) for
Packit 345191
        details.</para></listitem>
Packit 345191
      </varlistentry>
Packit 345191
Packit 345191
      <varlistentry id="stats.resident">
Packit 345191
        <term>
Packit 345191
          <mallctl>stats.resident</mallctl>
Packit 345191
          (<type>size_t</type>)
Packit 345191
          <literal>r-</literal>
Packit 345191
          [<option>--enable-stats</option>]
Packit 345191
        </term>
Packit 345191
        <listitem><para>Maximum number of bytes in physically resident data
Packit 345191
        pages mapped by the allocator, comprising all pages dedicated to
Packit 345191
        allocator metadata, pages backing active allocations, and unused dirty
Packit 345191
        pages.  This is a maximum rather than precise because pages may not
Packit 345191
        actually be physically resident if they correspond to demand-zeroed
Packit 345191
        virtual memory that has not yet been touched.  This is a multiple of the
Packit 345191
        page size, and is larger than 
Packit 345191
        linkend="stats.active"><mallctl>stats.active</mallctl></link>.</para></listitem>
Packit 345191
      </varlistentry>
Packit 345191
Packit 345191
      <varlistentry id="stats.mapped">
Packit 345191
        <term>
Packit 345191
          <mallctl>stats.mapped</mallctl>
Packit 345191
          (<type>size_t</type>)
Packit 345191
          <literal>r-</literal>
Packit 345191
          [<option>--enable-stats</option>]
Packit 345191
        </term>
Packit 345191
        <listitem><para>Total number of bytes in active extents mapped by the
Packit 345191
        allocator.  This is larger than 
Packit 345191
        linkend="stats.active"><mallctl>stats.active</mallctl></link>.  This
Packit 345191
        does not include inactive extents, even those that contain unused dirty
Packit 345191
        pages, which means that there is no strict ordering between this and
Packit 345191
        
Packit 345191
        linkend="stats.resident"><mallctl>stats.resident</mallctl></link>.</para></listitem>
Packit 345191
      </varlistentry>
Packit 345191
Packit 345191
      <varlistentry id="stats.retained">
Packit 345191
        <term>
Packit 345191
          <mallctl>stats.retained</mallctl>
Packit 345191
          (<type>size_t</type>)
Packit 345191
          <literal>r-</literal>
Packit 345191
          [<option>--enable-stats</option>]
Packit 345191
        </term>
Packit 345191
        <listitem><para>Total number of bytes in virtual memory mappings that
Packit 345191
        were retained rather than being returned to the operating system via
Packit 345191
        e.g. <citerefentry><refentrytitle>munmap</refentrytitle>
Packit 345191
        <manvolnum>2</manvolnum></citerefentry> or similar.  Retained virtual
Packit 345191
        memory is typically untouched, decommitted, or purged, so it has no
Packit 345191
        strongly associated physical memory (see 
Packit 345191
        linkend="arena.i.extent_hooks">extent hooks</link> for details).
Packit 345191
        Retained memory is excluded from mapped memory statistics, e.g. 
Packit 345191
        linkend="stats.mapped"><mallctl>stats.mapped</mallctl></link>.
Packit 345191
        </para></listitem>
Packit 345191
      </varlistentry>
Packit 345191
Packit 345191
      <varlistentry id="stats.background_thread.num_threads">
Packit 345191
        <term>
Packit 345191
          <mallctl>stats.background_thread.num_threads</mallctl>
Packit 345191
          (<type>size_t</type>)
Packit 345191
          <literal>r-</literal>
Packit 345191
          [<option>--enable-stats</option>]
Packit 345191
        </term>
Packit 345191
        <listitem><para> Number of <link linkend="background_thread">background
Packit 345191
        threads</link> running currently.</para></listitem>
Packit 345191
      </varlistentry>
Packit 345191
Packit 345191
      <varlistentry id="stats.background_thread.num_runs">
Packit 345191
        <term>
Packit 345191
          <mallctl>stats.background_thread.num_runs</mallctl>
Packit 345191
          (<type>uint64_t</type>)
Packit 345191
          <literal>r-</literal>
Packit 345191
          [<option>--enable-stats</option>]
Packit 345191
        </term>
Packit 345191
        <listitem><para> Total number of runs from all 
Packit 345191
        linkend="background_thread">background threads</link>.</para></listitem>
Packit 345191
      </varlistentry>
Packit 345191
Packit 345191
      <varlistentry id="stats.background_thread.run_interval">
Packit 345191
        <term>
Packit 345191
          <mallctl>stats.background_thread.run_interval</mallctl>
Packit 345191
          (<type>uint64_t</type>)
Packit 345191
          <literal>r-</literal>
Packit 345191
          [<option>--enable-stats</option>]
Packit 345191
        </term>
Packit 345191
        <listitem><para> Average run interval in nanoseconds of 
Packit 345191
        linkend="background_thread">background threads</link>.</para></listitem>
Packit 345191
      </varlistentry>
Packit 345191
Packit 345191
      <varlistentry id="stats.mutexes.ctl">
Packit 345191
        <term>
Packit 345191
          <mallctl>stats.mutexes.ctl.{counter};</mallctl>
Packit 345191
          (<type>counter specific type</type>)
Packit 345191
          <literal>r-</literal>
Packit 345191
          [<option>--enable-stats</option>]
Packit 345191
        </term>
Packit 345191
        <listitem><para>Statistics on <varname>ctl</varname> mutex (global
Packit 345191
        scope; mallctl related).  <mallctl>{counter}</mallctl> is one of the
Packit 345191
        counters below:</para>
Packit 345191
        <varlistentry id="mutex_counters">
Packit 345191
          <listitem><para><varname>num_ops</varname> (<type>uint64_t</type>):
Packit 345191
          Total number of lock acquisition operations on this mutex.</para>
Packit 345191
Packit 345191
	  <para><varname>num_spin_acq</varname> (<type>uint64_t</type>): Number
Packit 345191
	  of times the mutex was spin-acquired.  When the mutex is currently
Packit 345191
	  locked and cannot be acquired immediately, a short period of
Packit 345191
	  spin-retry within jemalloc will be performed.  Acquired through spin
Packit 345191
	  generally means the contention was lightweight and not causing context
Packit 345191
	  switches.</para>
Packit 345191
Packit 345191
	  <para><varname>num_wait</varname> (<type>uint64_t</type>): Number of
Packit 345191
	  times the mutex was wait-acquired, which means the mutex contention
Packit 345191
	  was not solved by spin-retry, and blocking operation was likely
Packit 345191
	  involved in order to acquire the mutex.  This event generally implies
Packit 345191
	  higher cost / longer delay, and should be investigated if it happens
Packit 345191
	  often.</para>
Packit 345191
Packit 345191
	  <para><varname>max_wait_time</varname> (<type>uint64_t</type>):
Packit 345191
	  Maximum length of time in nanoseconds spent on a single wait-acquired
Packit 345191
	  lock operation.  Note that to avoid profiling overhead on the common
Packit 345191
	  path, this does not consider spin-acquired cases.</para>
Packit 345191
Packit 345191
	  <para><varname>total_wait_time</varname> (<type>uint64_t</type>):
Packit 345191
	  Cumulative time in nanoseconds spent on wait-acquired lock operations.
Packit 345191
	  Similarly, spin-acquired cases are not considered.</para>
Packit 345191
Packit 345191
	  <para><varname>max_num_thds</varname> (<type>uint32_t</type>): Maximum
Packit 345191
	  number of threads waiting on this mutex simultaneously.  Similarly,
Packit 345191
	  spin-acquired cases are not considered.</para>
Packit 345191
Packit 345191
	  <para><varname>num_owner_switch</varname> (<type>uint64_t</type>):
Packit 345191
	  Number of times the current mutex owner is different from the previous
Packit 345191
	  one.  This event does not generally imply an issue; rather it is an
Packit 345191
	  indicator of how often the protected data are accessed by different
Packit 345191
	  threads.
Packit 345191
	  </para>
Packit 345191
	  </listitem>
Packit 345191
	</varlistentry>
Packit 345191
	</listitem>
Packit 345191
      </varlistentry>
Packit 345191
Packit 345191
      <varlistentry id="stats.mutexes.background_thread">
Packit 345191
        <term>
Packit 345191
          <mallctl>stats.mutexes.background_thread.{counter}</mallctl>
Packit 345191
	  (<type>counter specific type</type>) <literal>r-</literal>
Packit 345191
          [<option>--enable-stats</option>]
Packit 345191
        </term>
Packit 345191
        <listitem><para>Statistics on <varname>background_thread</varname> mutex
Packit 345191
        (global scope; 
Packit 345191
        linkend="background_thread"><mallctl>background_thread</mallctl></link>
Packit 345191
        related).  <mallctl>{counter}</mallctl> is one of the counters in 
Packit 345191
        linkend="mutex_counters">mutex profiling
Packit 345191
        counters</link>.</para></listitem>
Packit 345191
      </varlistentry>
Packit 345191
Packit 345191
      <varlistentry id="stats.mutexes.prof">
Packit 345191
        <term>
Packit 345191
          <mallctl>stats.mutexes.prof.{counter}</mallctl>
Packit 345191
	  (<type>counter specific type</type>) <literal>r-</literal>
Packit 345191
          [<option>--enable-stats</option>]
Packit 345191
        </term>
Packit 345191
        <listitem><para>Statistics on <varname>prof</varname> mutex (global
Packit 345191
        scope; profiling related).  <mallctl>{counter}</mallctl> is one of the
Packit 345191
        counters in <link linkend="mutex_counters">mutex profiling
Packit 345191
        counters</link>.</para></listitem>
Packit 345191
      </varlistentry>
Packit 345191
Packit 345191
      <varlistentry id="stats.mutexes.reset">
Packit 345191
        <term>
Packit 345191
          <mallctl>stats.mutexes.reset</mallctl>
Packit 345191
	  (<type>void</type>) <literal>--</literal>
Packit 345191
          [<option>--enable-stats</option>]
Packit 345191
        </term>
Packit 345191
        <listitem><para>Reset all mutex profile statistics, including global
Packit 345191
        mutexes, arena mutexes and bin mutexes.</para></listitem>
Packit 345191
      </varlistentry>
Packit 345191
Packit 345191
      <varlistentry id="stats.arenas.i.dss">
Packit 345191
        <term>
Packit 345191
          <mallctl>stats.arenas.<i>.dss</mallctl>
Packit 345191
          (<type>const char *</type>)
Packit 345191
          <literal>r-</literal>
Packit 345191
        </term>
Packit 345191
        <listitem><para>dss (<citerefentry><refentrytitle>sbrk</refentrytitle>
Packit 345191
        <manvolnum>2</manvolnum></citerefentry>) allocation precedence as
Packit 345191
        related to <citerefentry><refentrytitle>mmap</refentrytitle>
Packit 345191
        <manvolnum>2</manvolnum></citerefentry> allocation.  See 
Packit 345191
        linkend="opt.dss"><mallctl>opt.dss</mallctl></link> for details.
Packit 345191
        </para></listitem>
Packit 345191
      </varlistentry>
Packit 345191
Packit 345191
      <varlistentry id="stats.arenas.i.dirty_decay_ms">
Packit 345191
        <term>
Packit 345191
          <mallctl>stats.arenas.<i>.dirty_decay_ms</mallctl>
Packit 345191
          (<type>ssize_t</type>)
Packit 345191
          <literal>r-</literal>
Packit 345191
        </term>
Packit 345191
        <listitem><para>Approximate time in milliseconds from the creation of a
Packit 345191
        set of unused dirty pages until an equivalent set of unused dirty pages
Packit 345191
        is purged and/or reused.  See 
Packit 345191
        linkend="opt.dirty_decay_ms"><mallctl>opt.dirty_decay_ms</mallctl></link>
Packit 345191
        for details.</para></listitem>
Packit 345191
      </varlistentry>
Packit 345191
Packit 345191
      <varlistentry id="stats.arenas.i.muzzy_decay_ms">
Packit 345191
        <term>
Packit 345191
          <mallctl>stats.arenas.<i>.muzzy_decay_ms</mallctl>
Packit 345191
          (<type>ssize_t</type>)
Packit 345191
          <literal>r-</literal>
Packit 345191
        </term>
Packit 345191
        <listitem><para>Approximate time in milliseconds from the creation of a
Packit 345191
        set of unused muzzy pages until an equivalent set of unused muzzy pages
Packit 345191
        is purged and/or reused.  See 
Packit 345191
        linkend="opt.muzzy_decay_ms"><mallctl>opt.muzzy_decay_ms</mallctl></link>
Packit 345191
        for details.</para></listitem>
Packit 345191
      </varlistentry>
Packit 345191
Packit 345191
      <varlistentry id="stats.arenas.i.nthreads">
Packit 345191
        <term>
Packit 345191
          <mallctl>stats.arenas.<i>.nthreads</mallctl>
Packit 345191
          (<type>unsigned</type>)
Packit 345191
          <literal>r-</literal>
Packit 345191
        </term>
Packit 345191
        <listitem><para>Number of threads currently assigned to
Packit 345191
        arena.</para></listitem>
Packit 345191
      </varlistentry>
Packit 345191
Packit 345191
      <varlistentry id="stats.arenas.i.uptime">
Packit 345191
        <term>
Packit 345191
          <mallctl>stats.arenas.<i>.uptime</mallctl>
Packit 345191
          (<type>uint64_t</type>)
Packit 345191
          <literal>r-</literal>
Packit 345191
        </term>
Packit 345191
        <listitem><para>Time elapsed (in nanoseconds) since the arena was
Packit 345191
        created.  If <i> equals <constant>0</constant> or
Packit 345191
        <constant>MALLCTL_ARENAS_ALL</constant>, this is the uptime since malloc
Packit 345191
        initialization.</para></listitem>
Packit 345191
      </varlistentry>
Packit 345191
Packit 345191
      <varlistentry id="stats.arenas.i.pactive">
Packit 345191
        <term>
Packit 345191
          <mallctl>stats.arenas.<i>.pactive</mallctl>
Packit 345191
          (<type>size_t</type>)
Packit 345191
          <literal>r-</literal>
Packit 345191
        </term>
Packit 345191
        <listitem><para>Number of pages in active extents.</para></listitem>
Packit 345191
      </varlistentry>
Packit 345191
Packit 345191
      <varlistentry id="stats.arenas.i.pdirty">
Packit 345191
        <term>
Packit 345191
          <mallctl>stats.arenas.<i>.pdirty</mallctl>
Packit 345191
          (<type>size_t</type>)
Packit 345191
          <literal>r-</literal>
Packit 345191
        </term>
Packit 345191
        <listitem><para>Number of pages within unused extents that are
Packit 345191
        potentially dirty, and for which <function>madvise()</function> or
Packit 345191
        similar has not been called.  See 
Packit 345191
        linkend="opt.dirty_decay_ms"><mallctl>opt.dirty_decay_ms</mallctl></link>
Packit 345191
        for a description of dirty pages.</para></listitem>
Packit 345191
      </varlistentry>
Packit 345191
Packit 345191
      <varlistentry id="stats.arenas.i.pmuzzy">
Packit 345191
        <term>
Packit 345191
          <mallctl>stats.arenas.<i>.pmuzzy</mallctl>
Packit 345191
          (<type>size_t</type>)
Packit 345191
          <literal>r-</literal>
Packit 345191
        </term>
Packit 345191
        <listitem><para>Number of pages within unused extents that are muzzy.
Packit 345191
        See 
Packit 345191
        linkend="opt.muzzy_decay_ms"><mallctl>opt.muzzy_decay_ms</mallctl></link>
Packit 345191
        for a description of muzzy pages.</para></listitem>
Packit 345191
      </varlistentry>
Packit 345191
Packit 345191
      <varlistentry id="stats.arenas.i.mapped">
Packit 345191
        <term>
Packit 345191
          <mallctl>stats.arenas.<i>.mapped</mallctl>
Packit 345191
          (<type>size_t</type>)
Packit 345191
          <literal>r-</literal>
Packit 345191
          [<option>--enable-stats</option>]
Packit 345191
        </term>
Packit 345191
        <listitem><para>Number of mapped bytes.</para></listitem>
Packit 345191
      </varlistentry>
Packit 345191
Packit 345191
      <varlistentry id="stats.arenas.i.retained">
Packit 345191
        <term>
Packit 345191
          <mallctl>stats.arenas.<i>.retained</mallctl>
Packit 345191
          (<type>size_t</type>)
Packit 345191
          <literal>r-</literal>
Packit 345191
          [<option>--enable-stats</option>]
Packit 345191
        </term>
Packit 345191
        <listitem><para>Number of retained bytes.  See 
Packit 345191
        linkend="stats.retained"><mallctl>stats.retained</mallctl></link> for
Packit 345191
        details.</para></listitem>
Packit 345191
      </varlistentry>
Packit 345191
Packit 345191
      <varlistentry id="stats.arenas.i.extent_avail">
Packit 345191
        <term>
Packit 345191
          <mallctl>stats.arenas.<i>.extent_avail</mallctl>
Packit 345191
          (<type>size_t</type>)
Packit 345191
          <literal>r-</literal>
Packit 345191
          [<option>--enable-stats</option>]
Packit 345191
        </term>
Packit 345191
        <listitem><para>Number of allocated (but unused) extent structs in this
Packit 345191
	arena.</para></listitem>
Packit 345191
      </varlistentry>
Packit 345191
Packit 345191
      <varlistentry id="stats.arenas.i.base">
Packit 345191
        <term>
Packit 345191
          <mallctl>stats.arenas.<i>.base</mallctl>
Packit 345191
          (<type>size_t</type>)
Packit 345191
          <literal>r-</literal>
Packit 345191
          [<option>--enable-stats</option>]
Packit 345191
        </term>
Packit 345191
        <listitem><para>
Packit 345191
        Number of bytes dedicated to bootstrap-sensitive allocator metadata
Packit 345191
        structures.</para></listitem>
Packit 345191
      </varlistentry>
Packit 345191
Packit 345191
      <varlistentry id="stats.arenas.i.internal">
Packit 345191
        <term>
Packit 345191
          <mallctl>stats.arenas.<i>.internal</mallctl>
Packit 345191
          (<type>size_t</type>)
Packit 345191
          <literal>r-</literal>
Packit 345191
          [<option>--enable-stats</option>]
Packit 345191
        </term>
Packit 345191
        <listitem><para>Number of bytes dedicated to internal allocations.
Packit 345191
        Internal allocations differ from application-originated allocations in
Packit 345191
        that they are for internal use, and that they are omitted from heap
Packit 345191
        profiles.</para></listitem>
Packit 345191
      </varlistentry>
Packit 345191
Packit 345191
      <varlistentry id="stats.arenas.i.metadata_thp">
Packit 345191
        <term>
Packit 345191
          <mallctl>stats.arenas.<i>.metadata_thp</mallctl>
Packit 345191
          (<type>size_t</type>)
Packit 345191
          <literal>r-</literal>
Packit 345191
          [<option>--enable-stats</option>]
Packit 345191
        </term>
Packit 345191
        <listitem><para>Number of transparent huge pages (THP) used for
Packit 345191
        metadata.  See <link linkend="opt.metadata_thp">opt.metadata_thp</link>
Packit 345191
        for details.</para></listitem>
Packit 345191
      </varlistentry>
Packit 345191
Packit 345191
      <varlistentry id="stats.arenas.i.resident">
Packit 345191
        <term>
Packit 345191
          <mallctl>stats.arenas.<i>.resident</mallctl>
Packit 345191
          (<type>size_t</type>)
Packit 345191
          <literal>r-</literal>
Packit 345191
          [<option>--enable-stats</option>]
Packit 345191
        </term>
Packit 345191
        <listitem><para>Maximum number of bytes in physically resident data
Packit 345191
        pages mapped by the arena, comprising all pages dedicated to allocator
Packit 345191
        metadata, pages backing active allocations, and unused dirty pages.
Packit 345191
        This is a maximum rather than precise because pages may not actually be
Packit 345191
        physically resident if they correspond to demand-zeroed virtual memory
Packit 345191
        that has not yet been touched.  This is a multiple of the page
Packit 345191
        size.</para></listitem>
Packit 345191
      </varlistentry>
Packit 345191
Packit 345191
      <varlistentry id="stats.arenas.i.dirty_npurge">
Packit 345191
        <term>
Packit 345191
          <mallctl>stats.arenas.<i>.dirty_npurge</mallctl>
Packit 345191
          (<type>uint64_t</type>)
Packit 345191
          <literal>r-</literal>
Packit 345191
          [<option>--enable-stats</option>]
Packit 345191
        </term>
Packit 345191
        <listitem><para>Number of dirty page purge sweeps performed.
Packit 345191
        </para></listitem>
Packit 345191
      </varlistentry>
Packit 345191
Packit 345191
      <varlistentry id="stats.arenas.i.dirty_nmadvise">
Packit 345191
        <term>
Packit 345191
          <mallctl>stats.arenas.<i>.dirty_nmadvise</mallctl>
Packit 345191
          (<type>uint64_t</type>)
Packit 345191
          <literal>r-</literal>
Packit 345191
          [<option>--enable-stats</option>]
Packit 345191
        </term>
Packit 345191
        <listitem><para>Number of <function>madvise()</function> or similar
Packit 345191
        calls made to purge dirty pages.</para></listitem>
Packit 345191
      </varlistentry>
Packit 345191
Packit 345191
      <varlistentry id="stats.arenas.i.dirty_purged">
Packit 345191
        <term>
Packit 345191
          <mallctl>stats.arenas.<i>.dirty_purged</mallctl>
Packit 345191
          (<type>uint64_t</type>)
Packit 345191
          <literal>r-</literal>
Packit 345191
          [<option>--enable-stats</option>]
Packit 345191
        </term>
Packit 345191
        <listitem><para>Number of dirty pages purged.</para></listitem>
Packit 345191
      </varlistentry>
Packit 345191
Packit 345191
      <varlistentry id="stats.arenas.i.muzzy_npurge">
Packit 345191
        <term>
Packit 345191
          <mallctl>stats.arenas.<i>.muzzy_npurge</mallctl>
Packit 345191
          (<type>uint64_t</type>)
Packit 345191
          <literal>r-</literal>
Packit 345191
          [<option>--enable-stats</option>]
Packit 345191
        </term>
Packit 345191
        <listitem><para>Number of muzzy page purge sweeps performed.
Packit 345191
        </para></listitem>
Packit 345191
      </varlistentry>
Packit 345191
Packit 345191
      <varlistentry id="stats.arenas.i.muzzy_nmadvise">
Packit 345191
        <term>
Packit 345191
          <mallctl>stats.arenas.<i>.muzzy_nmadvise</mallctl>
Packit 345191
          (<type>uint64_t</type>)
Packit 345191
          <literal>r-</literal>
Packit 345191
          [<option>--enable-stats</option>]
Packit 345191
        </term>
Packit 345191
        <listitem><para>Number of <function>madvise()</function> or similar
Packit 345191
        calls made to purge muzzy pages.</para></listitem>
Packit 345191
      </varlistentry>
Packit 345191
Packit 345191
      <varlistentry id="stats.arenas.i.muzzy_purged">
Packit 345191
        <term>
Packit 345191
          <mallctl>stats.arenas.<i>.muzzy_purged</mallctl>
Packit 345191
          (<type>uint64_t</type>)
Packit 345191
          <literal>r-</literal>
Packit 345191
          [<option>--enable-stats</option>]
Packit 345191
        </term>
Packit 345191
        <listitem><para>Number of muzzy pages purged.</para></listitem>
Packit 345191
      </varlistentry>
Packit 345191
Packit 345191
      <varlistentry id="stats.arenas.i.small.allocated">
Packit 345191
        <term>
Packit 345191
          <mallctl>stats.arenas.<i>.small.allocated</mallctl>
Packit 345191
          (<type>size_t</type>)
Packit 345191
          <literal>r-</literal>
Packit 345191
          [<option>--enable-stats</option>]
Packit 345191
        </term>
Packit 345191
        <listitem><para>Number of bytes currently allocated by small objects.
Packit 345191
        </para></listitem>
Packit 345191
      </varlistentry>
Packit 345191
Packit 345191
      <varlistentry id="stats.arenas.i.small.nmalloc">
Packit 345191
        <term>
Packit 345191
          <mallctl>stats.arenas.<i>.small.nmalloc</mallctl>
Packit 345191
          (<type>uint64_t</type>)
Packit 345191
          <literal>r-</literal>
Packit 345191
          [<option>--enable-stats</option>]
Packit 345191
        </term>
Packit 345191
        <listitem><para>Cumulative number of times a small allocation was
Packit 345191
        requested from the arena's bins, whether to fill the relevant tcache if
Packit 345191
        <link linkend="opt.tcache"><mallctl>opt.tcache</mallctl></link> is
Packit 345191
        enabled, or to directly satisfy an allocation request
Packit 345191
        otherwise.</para></listitem>
Packit 345191
      </varlistentry>
Packit 345191
Packit 345191
      <varlistentry id="stats.arenas.i.small.ndalloc">
Packit 345191
        <term>
Packit 345191
          <mallctl>stats.arenas.<i>.small.ndalloc</mallctl>
Packit 345191
          (<type>uint64_t</type>)
Packit 345191
          <literal>r-</literal>
Packit 345191
          [<option>--enable-stats</option>]
Packit 345191
        </term>
Packit 345191
        <listitem><para>Cumulative number of times a small allocation was
Packit 345191
        returned to the arena's bins, whether to flush the relevant tcache if
Packit 345191
        <link linkend="opt.tcache"><mallctl>opt.tcache</mallctl></link> is
Packit 345191
        enabled, or to directly deallocate an allocation
Packit 345191
        otherwise.</para></listitem>
Packit 345191
      </varlistentry>
Packit 345191
Packit 345191
      <varlistentry id="stats.arenas.i.small.nrequests">
Packit 345191
        <term>
Packit 345191
          <mallctl>stats.arenas.<i>.small.nrequests</mallctl>
Packit 345191
          (<type>uint64_t</type>)
Packit 345191
          <literal>r-</literal>
Packit 345191
          [<option>--enable-stats</option>]
Packit 345191
        </term>
Packit 345191
        <listitem><para>Cumulative number of allocation requests satisfied by
Packit 345191
        all bin size classes.</para></listitem>
Packit 345191
      </varlistentry>
Packit 345191
Packit 345191
      <varlistentry id="stats.arenas.i.small.nfills">
Packit 345191
        <term>
Packit 345191
          <mallctl>stats.arenas.<i>.small.nfills</mallctl>
Packit 345191
          (<type>uint64_t</type>)
Packit 345191
          <literal>r-</literal>
Packit 345191
          [<option>--enable-stats</option>]
Packit 345191
        </term>
Packit 345191
        <listitem><para>Cumulative number of tcache fills by all small size
Packit 345191
	classes.</para></listitem>
Packit 345191
      </varlistentry>
Packit 345191
Packit 345191
      <varlistentry id="stats.arenas.i.small.nflushes">
Packit 345191
        <term>
Packit 345191
          <mallctl>stats.arenas.<i>.small.nflushes</mallctl>
Packit 345191
          (<type>uint64_t</type>)
Packit 345191
          <literal>r-</literal>
Packit 345191
          [<option>--enable-stats</option>]
Packit 345191
        </term>
Packit 345191
        <listitem><para>Cumulative number of tcache flushes by all small size
Packit 345191
        classes.</para></listitem>
Packit 345191
      </varlistentry>
Packit 345191
Packit 345191
      <varlistentry id="stats.arenas.i.large.allocated">
Packit 345191
        <term>
Packit 345191
          <mallctl>stats.arenas.<i>.large.allocated</mallctl>
Packit 345191
          (<type>size_t</type>)
Packit 345191
          <literal>r-</literal>
Packit 345191
          [<option>--enable-stats</option>]
Packit 345191
        </term>
Packit 345191
        <listitem><para>Number of bytes currently allocated by large objects.
Packit 345191
        </para></listitem>
Packit 345191
      </varlistentry>
Packit 345191
Packit 345191
      <varlistentry id="stats.arenas.i.large.nmalloc">
Packit 345191
        <term>
Packit 345191
          <mallctl>stats.arenas.<i>.large.nmalloc</mallctl>
Packit 345191
          (<type>uint64_t</type>)
Packit 345191
          <literal>r-</literal>
Packit 345191
          [<option>--enable-stats</option>]
Packit 345191
        </term>
Packit 345191
        <listitem><para>Cumulative number of times a large extent was allocated
Packit 345191
        from the arena, whether to fill the relevant tcache if 
Packit 345191
        linkend="opt.tcache"><mallctl>opt.tcache</mallctl></link> is enabled and
Packit 345191
        the size class is within the range being cached, or to directly satisfy
Packit 345191
        an allocation request otherwise.</para></listitem>
Packit 345191
      </varlistentry>
Packit 345191
Packit 345191
      <varlistentry id="stats.arenas.i.large.ndalloc">
Packit 345191
        <term>
Packit 345191
          <mallctl>stats.arenas.<i>.large.ndalloc</mallctl>
Packit 345191
          (<type>uint64_t</type>)
Packit 345191
          <literal>r-</literal>
Packit 345191
          [<option>--enable-stats</option>]
Packit 345191
        </term>
Packit 345191
        <listitem><para>Cumulative number of times a large extent was returned
Packit 345191
        to the arena, whether to flush the relevant tcache if 
Packit 345191
        linkend="opt.tcache"><mallctl>opt.tcache</mallctl></link> is enabled and
Packit 345191
        the size class is within the range being cached, or to directly
Packit 345191
        deallocate an allocation otherwise.</para></listitem>
Packit 345191
      </varlistentry>
Packit 345191
Packit 345191
      <varlistentry id="stats.arenas.i.large.nrequests">
Packit 345191
        <term>
Packit 345191
          <mallctl>stats.arenas.<i>.large.nrequests</mallctl>
Packit 345191
          (<type>uint64_t</type>)
Packit 345191
          <literal>r-</literal>
Packit 345191
          [<option>--enable-stats</option>]
Packit 345191
        </term>
Packit 345191
        <listitem><para>Cumulative number of allocation requests satisfied by
Packit 345191
        all large size classes.</para></listitem>
Packit 345191
      </varlistentry>
Packit 345191
Packit 345191
      <varlistentry id="stats.arenas.i.large.nfills">
Packit 345191
        <term>
Packit 345191
          <mallctl>stats.arenas.<i>.large.nfills</mallctl>
Packit 345191
          (<type>uint64_t</type>)
Packit 345191
          <literal>r-</literal>
Packit 345191
          [<option>--enable-stats</option>]
Packit 345191
        </term>
Packit 345191
        <listitem><para>Cumulative number of tcache fills by all large size
Packit 345191
	classes.</para></listitem>
Packit 345191
      </varlistentry>
Packit 345191
Packit 345191
      <varlistentry id="stats.arenas.i.large.nflushes">
Packit 345191
        <term>
Packit 345191
          <mallctl>stats.arenas.<i>.large.nflushes</mallctl>
Packit 345191
          (<type>uint64_t</type>)
Packit 345191
          <literal>r-</literal>
Packit 345191
          [<option>--enable-stats</option>]
Packit 345191
        </term>
Packit 345191
        <listitem><para>Cumulative number of tcache flushes by all large size
Packit 345191
        classes.</para></listitem>
Packit 345191
      </varlistentry>
Packit 345191
Packit 345191
      <varlistentry id="stats.arenas.i.bins.j.nmalloc">
Packit 345191
        <term>
Packit 345191
          <mallctl>stats.arenas.<i>.bins.<j>.nmalloc</mallctl>
Packit 345191
          (<type>uint64_t</type>)
Packit 345191
          <literal>r-</literal>
Packit 345191
          [<option>--enable-stats</option>]
Packit 345191
        </term>
Packit 345191
        <listitem><para>Cumulative number of times a bin region of the
Packit 345191
        corresponding size class was allocated from the arena, whether to fill
Packit 345191
        the relevant tcache if 
Packit 345191
        linkend="opt.tcache"><mallctl>opt.tcache</mallctl></link> is enabled, or
Packit 345191
        to directly satisfy an allocation request otherwise.</para></listitem>
Packit 345191
      </varlistentry>
Packit 345191
Packit 345191
      <varlistentry id="stats.arenas.i.bins.j.ndalloc">
Packit 345191
        <term>
Packit 345191
          <mallctl>stats.arenas.<i>.bins.<j>.ndalloc</mallctl>
Packit 345191
          (<type>uint64_t</type>)
Packit 345191
          <literal>r-</literal>
Packit 345191
          [<option>--enable-stats</option>]
Packit 345191
        </term>
Packit 345191
        <listitem><para>Cumulative number of times a bin region of the
Packit 345191
        corresponding size class was returned to the arena, whether to flush the
Packit 345191
        relevant tcache if 
Packit 345191
        linkend="opt.tcache"><mallctl>opt.tcache</mallctl></link> is enabled, or
Packit 345191
        to directly deallocate an allocation otherwise.</para></listitem>
Packit 345191
      </varlistentry>
Packit 345191
Packit 345191
      <varlistentry id="stats.arenas.i.bins.j.nrequests">
Packit 345191
        <term>
Packit 345191
          <mallctl>stats.arenas.<i>.bins.<j>.nrequests</mallctl>
Packit 345191
          (<type>uint64_t</type>)
Packit 345191
          <literal>r-</literal>
Packit 345191
          [<option>--enable-stats</option>]
Packit 345191
        </term>
Packit 345191
        <listitem><para>Cumulative number of allocation requests satisfied by
Packit 345191
        bin regions of the corresponding size class.</para></listitem>
Packit 345191
      </varlistentry>
Packit 345191
Packit 345191
      <varlistentry id="stats.arenas.i.bins.j.curregs">
Packit 345191
        <term>
Packit 345191
          <mallctl>stats.arenas.<i>.bins.<j>.curregs</mallctl>
Packit 345191
          (<type>size_t</type>)
Packit 345191
          <literal>r-</literal>
Packit 345191
          [<option>--enable-stats</option>]
Packit 345191
        </term>
Packit 345191
        <listitem><para>Current number of regions for this size
Packit 345191
        class.</para></listitem>
Packit 345191
      </varlistentry>
Packit 345191
Packit 345191
      <varlistentry id="stats.arenas.i.bins.j.nfills">
Packit 345191
        <term>
Packit 345191
          <mallctl>stats.arenas.<i>.bins.<j>.nfills</mallctl>
Packit 345191
          (<type>uint64_t</type>)
Packit 345191
          <literal>r-</literal>
Packit 345191
        </term>
Packit 345191
        <listitem><para>Cumulative number of tcache fills.</para></listitem>
Packit 345191
      </varlistentry>
Packit 345191
Packit 345191
      <varlistentry id="stats.arenas.i.bins.j.nflushes">
Packit 345191
        <term>
Packit 345191
          <mallctl>stats.arenas.<i>.bins.<j>.nflushes</mallctl>
Packit 345191
          (<type>uint64_t</type>)
Packit 345191
          <literal>r-</literal>
Packit 345191
        </term>
Packit 345191
        <listitem><para>Cumulative number of tcache flushes.</para></listitem>
Packit 345191
      </varlistentry>
Packit 345191
Packit 345191
      <varlistentry id="stats.arenas.i.bins.j.nslabs">
Packit 345191
        <term>
Packit 345191
          <mallctl>stats.arenas.<i>.bins.<j>.nslabs</mallctl>
Packit 345191
          (<type>uint64_t</type>)
Packit 345191
          <literal>r-</literal>
Packit 345191
          [<option>--enable-stats</option>]
Packit 345191
        </term>
Packit 345191
        <listitem><para>Cumulative number of slabs created.</para></listitem>
Packit 345191
      </varlistentry>
Packit 345191
Packit 345191
      <varlistentry id="stats.arenas.i.bins.j.nreslabs">
Packit 345191
        <term>
Packit 345191
          <mallctl>stats.arenas.<i>.bins.<j>.nreslabs</mallctl>
Packit 345191
          (<type>uint64_t</type>)
Packit 345191
          <literal>r-</literal>
Packit 345191
          [<option>--enable-stats</option>]
Packit 345191
        </term>
Packit 345191
        <listitem><para>Cumulative number of times the current slab from which
Packit 345191
        to allocate changed.</para></listitem>
Packit 345191
      </varlistentry>
Packit 345191
Packit 345191
      <varlistentry id="stats.arenas.i.bins.j.curslabs">
Packit 345191
        <term>
Packit 345191
          <mallctl>stats.arenas.<i>.bins.<j>.curslabs</mallctl>
Packit 345191
          (<type>size_t</type>)
Packit 345191
          <literal>r-</literal>
Packit 345191
          [<option>--enable-stats</option>]
Packit 345191
        </term>
Packit 345191
        <listitem><para>Current number of slabs.</para></listitem>
Packit 345191
      </varlistentry>
Packit 345191
Packit 345191
Packit 345191
      <varlistentry id="stats.arenas.i.bins.j.nonfull_slabs">
Packit 345191
        <term>
Packit 345191
          <mallctl>stats.arenas.<i>.bins.<j>.nonfull_slabs</mallctl>
Packit 345191
          (<type>size_t</type>)
Packit 345191
          <literal>r-</literal>
Packit 345191
          [<option>--enable-stats</option>]
Packit 345191
        </term>
Packit 345191
        <listitem><para>Current number of nonfull slabs.</para></listitem>
Packit 345191
      </varlistentry>
Packit 345191
Packit 345191
      <varlistentry id="stats.arenas.i.bins.mutex">
Packit 345191
        <term>
Packit 345191
          <mallctl>stats.arenas.<i>.bins.<j>.mutex.{counter}</mallctl>
Packit 345191
          (<type>counter specific type</type>) <literal>r-</literal>
Packit 345191
          [<option>--enable-stats</option>]
Packit 345191
        </term>
Packit 345191
        <listitem><para>Statistics on
Packit 345191
        <varname>arena.<i>.bins.<j></varname> mutex (arena bin
Packit 345191
        scope; bin operation related).  <mallctl>{counter}</mallctl> is one of
Packit 345191
        the counters in <link linkend="mutex_counters">mutex profiling
Packit 345191
        counters</link>.</para></listitem>
Packit 345191
      </varlistentry>
Packit 345191
Packit 345191
      <varlistentry id="stats.arenas.i.extents.n">
Packit 345191
        <term>
Packit 345191
          <mallctl>stats.arenas.<i>.extents.<j>.n{extent_type}</mallctl>
Packit 345191
          (<type>size_t</type>)
Packit 345191
          <literal>r-</literal>
Packit 345191
          [<option>--enable-stats</option>]
Packit 345191
        </term>
Packit 345191
        <listitem><para> Number of extents of the given type in this arena in
Packit 345191
	the bucket corresponding to page size index <j>. The extent type
Packit 345191
	is one of dirty, muzzy, or retained.</para></listitem>
Packit 345191
      </varlistentry>
Packit 345191
Packit 345191
      <varlistentry id="stats.arenas.i.extents.bytes">
Packit 345191
        <term>
Packit 345191
          <mallctl>stats.arenas.<i>.extents.<j>.{extent_type}_bytes</mallctl>
Packit 345191
          (<type>size_t</type>)
Packit 345191
          <literal>r-</literal>
Packit 345191
          [<option>--enable-stats</option>]
Packit 345191
        </term>
Packit 345191
	<listitem><para> Sum of the bytes managed by extents of the given type
Packit 345191
	in this arena in the bucket corresponding to page size index <j>.
Packit 345191
	The extent type is one of dirty, muzzy, or retained.</para></listitem>
Packit 345191
      </varlistentry>
Packit 345191
Packit 345191
      <varlistentry id="stats.arenas.i.lextents.j.nmalloc">
Packit 345191
        <term>
Packit 345191
          <mallctl>stats.arenas.<i>.lextents.<j>.nmalloc</mallctl>
Packit 345191
          (<type>uint64_t</type>)
Packit 345191
          <literal>r-</literal>
Packit 345191
          [<option>--enable-stats</option>]
Packit 345191
        </term>
Packit 345191
        <listitem><para>Cumulative number of times a large extent of the
Packit 345191
        corresponding size class was allocated from the arena, whether to fill
Packit 345191
        the relevant tcache if 
Packit 345191
        linkend="opt.tcache"><mallctl>opt.tcache</mallctl></link> is enabled and
Packit 345191
        the size class is within the range being cached, or to directly satisfy
Packit 345191
        an allocation request otherwise.</para></listitem>
Packit 345191
      </varlistentry>
Packit 345191
Packit 345191
      <varlistentry id="stats.arenas.i.lextents.j.ndalloc">
Packit 345191
        <term>
Packit 345191
          <mallctl>stats.arenas.<i>.lextents.<j>.ndalloc</mallctl>
Packit 345191
          (<type>uint64_t</type>)
Packit 345191
          <literal>r-</literal>
Packit 345191
          [<option>--enable-stats</option>]
Packit 345191
        </term>
Packit 345191
        <listitem><para>Cumulative number of times a large extent of the
Packit 345191
        corresponding size class was returned to the arena, whether to flush the
Packit 345191
        relevant tcache if 
Packit 345191
        linkend="opt.tcache"><mallctl>opt.tcache</mallctl></link> is enabled and
Packit 345191
        the size class is within the range being cached, or to directly
Packit 345191
        deallocate an allocation otherwise.</para></listitem>
Packit 345191
      </varlistentry>
Packit 345191
Packit 345191
      <varlistentry id="stats.arenas.i.lextents.j.nrequests">
Packit 345191
        <term>
Packit 345191
          <mallctl>stats.arenas.<i>.lextents.<j>.nrequests</mallctl>
Packit 345191
          (<type>uint64_t</type>)
Packit 345191
          <literal>r-</literal>
Packit 345191
          [<option>--enable-stats</option>]
Packit 345191
        </term>
Packit 345191
        <listitem><para>Cumulative number of allocation requests satisfied by
Packit 345191
        large extents of the corresponding size class.</para></listitem>
Packit 345191
      </varlistentry>
Packit 345191
Packit 345191
      <varlistentry id="stats.arenas.i.lextents.j.curlextents">
Packit 345191
        <term>
Packit 345191
          <mallctl>stats.arenas.<i>.lextents.<j>.curlextents</mallctl>
Packit 345191
          (<type>size_t</type>)
Packit 345191
          <literal>r-</literal>
Packit 345191
          [<option>--enable-stats</option>]