[−][src]Function jemalloc_sys::malloc_stats_print
pub unsafe extern "C" fn malloc_stats_print(
write_cb: Option<unsafe extern "C" fn(_: *mut c_void, _: *const c_char)>,
cbopaque: *mut c_void,
opts: *const c_char
)
Writes summary statistics via the write_cb
callback function pointer
and cbopaque
data passed to write_cb
, or malloc_message
if write_cb
is null.
The statistics are presented in human-readable form unless “J” is specified as a character within the opts string, in which case the statistics are presented in JSON format.
This function can be called repeatedly.
General information that never changes during execution can be omitted
by specifying g
as a character within the opts string.
Note that malloc_message
uses the mallctl*
functions internally,
so inconsistent statistics can be reported if multiple threads use these
functions simultaneously.
If the Cargo feature stats
is enabled, m
, d
, and a
can be
specified to omit merged arena, destroyed merged arena, and per arena
statistics, respectively; b
and l
can be specified to omit per size
class statistics for bins and large objects, respectively; x
can be
specified to omit all mutex statistics. Unrecognized characters are
silently ignored.
Note that thread caching may prevent some statistics from being completely up to date, since extra locking would be required to merge counters that track thread cache operations.