parent
4752a54eeb
commit
b599b32280
@ -410,29 +410,30 @@ for (i = 0; i < nbins; i++) {
|
|||||||
/* Do something with bin_size... */
|
/* Do something with bin_size... */
|
||||||
}]]></programlisting></para>
|
}]]></programlisting></para>
|
||||||
|
|
||||||
<para>The <function>malloc_stats_print()</function> function
|
<para>The <function>malloc_stats_print()</function> function writes
|
||||||
writes human-readable summary statistics via the
|
summary statistics via the <parameter>write_cb</parameter> callback
|
||||||
<parameter>write_cb</parameter> callback function pointer and
|
function pointer and <parameter>cbopaque</parameter> data passed to
|
||||||
<parameter>cbopaque</parameter> data passed to
|
<parameter>write_cb</parameter>, or <function>malloc_message()</function>
|
||||||
<parameter>write_cb</parameter>, or
|
if <parameter>write_cb</parameter> is <constant>NULL</constant>. The
|
||||||
<function>malloc_message()</function> if
|
statistics are presented in human-readable form unless <quote>J</quote> is
|
||||||
<parameter>write_cb</parameter> is <constant>NULL</constant>. This
|
specified as a character within the <parameter>opts</parameter> string, in
|
||||||
function can be called repeatedly. General information that never
|
which case the statistics are presented in <ulink
|
||||||
changes during execution can be omitted by specifying "g" as a character
|
url="http://www.json.org/">JSON format</ulink>. This function can be
|
||||||
|
called repeatedly. General information that never changes during
|
||||||
|
execution can be omitted by specifying <quote>g</quote> as a character
|
||||||
within the <parameter>opts</parameter> string. Note that
|
within the <parameter>opts</parameter> string. Note that
|
||||||
<function>malloc_message()</function> uses the
|
<function>malloc_message()</function> uses the
|
||||||
<function>mallctl*()</function> functions internally, so
|
<function>mallctl*()</function> functions internally, so inconsistent
|
||||||
inconsistent statistics can be reported if multiple threads use these
|
statistics can be reported if multiple threads use these functions
|
||||||
functions simultaneously. If <option>--enable-stats</option> is
|
simultaneously. If <option>--enable-stats</option> is specified during
|
||||||
specified during configuration, “m” and “a” can
|
configuration, <quote>m</quote> and <quote>a</quote> can be specified to
|
||||||
be specified to omit merged arena and per arena statistics, respectively;
|
omit merged arena and per arena statistics, respectively;
|
||||||
“b”, “l”, and “h” can be specified to
|
<quote>b</quote>, <quote>l</quote>, and <quote>h</quote> can be specified
|
||||||
omit per size class statistics for bins, large objects, and huge objects,
|
to omit per size class statistics for bins, large objects, and huge
|
||||||
respectively. Unrecognized characters are silently ignored. Note that
|
objects, respectively. Unrecognized characters are silently ignored.
|
||||||
thread caching may prevent some statistics from being completely up to
|
Note that thread caching may prevent some statistics from being completely
|
||||||
date, since extra locking would be required to merge counters that track
|
up to date, since extra locking would be required to merge counters that
|
||||||
thread cache operations.
|
track thread cache operations.</para>
|
||||||
</para>
|
|
||||||
|
|
||||||
<para>The <function>malloc_usable_size()</function> function
|
<para>The <function>malloc_usable_size()</function> function
|
||||||
returns the usable size of the allocation pointed to by
|
returns the usable size of the allocation pointed to by
|
||||||
|
1267
src/stats.c
1267
src/stats.c
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user