]> git.ipfire.org Git - thirdparty/man-pages.git/blame - man3/malloc_stats.3
man*/: ffix (un-bracket tables)
[thirdparty/man-pages.git] / man3 / malloc_stats.3
CommitLineData
a1eaacb1 1'\" t
067568db
MK
2.\" Copyright (c) 2012 by Michael Kerrisk <mtk.manpages@gmail.com>
3.\"
5fbde956 4.\" SPDX-License-Identifier: Linux-man-pages-copyleft
067568db 5.\"
4c1c5274 6.TH malloc_stats 3 (date) "Linux man-pages (unreleased)"
067568db
MK
7.SH NAME
8malloc_stats \- print memory allocation statistics
cf79e286
AC
9.SH LIBRARY
10Standard C library
8fc3b2cf 11.RI ( libc ", " \-lc )
067568db 12.SH SYNOPSIS
c7db92b9 13.nf
067568db 14.B #include <malloc.h>
dbfe9c70 15.PP
067568db 16.B void malloc_stats(void);
c7db92b9 17.fi
067568db
MK
18.SH DESCRIPTION
19The
20.BR malloc_stats ()
21function prints (on standard error) statistics about memory allocated by
22.BR malloc (3)
23and related functions.
24For each arena (allocation area), this function prints
1da7358e 25the total amount of memory allocated
067568db
MK
26and the total number of bytes consumed by in-use allocations.
27(These two values correspond to the
28.I arena
29and
30.I uordblks
31fields retrieved by
32.BR mallinfo (3).)
33In addition,
34the function prints the sum of these two statistics for all arenas,
35and the maximum number of blocks and bytes that were ever simultaneously
36allocated using
37.BR mmap (2).
72dd4c2f
ZL
38.SH ATTRIBUTES
39For an explanation of the terms used in this section, see
40.BR attributes (7).
41.TS
42allbox;
c466875e 43lbx lb lb
72dd4c2f
ZL
44l l l.
45Interface Attribute Value
46T{
9e54434e
BR
47.na
48.nh
72dd4c2f
ZL
49.BR malloc_stats ()
50T} Thread safety MT-Safe
51.TE
847e0d88 52.sp 1
3113c7f3 53.SH STANDARDS
4131356c
AC
54GNU.
55.SH HISTORY
56glibc 2.0.
067568db
MK
57.SH NOTES
58More detailed information about memory allocations in the main arena
59can be obtained using
60.BR mallinfo (3).
61.SH SEE ALSO
62.BR mmap (2),
63.BR mallinfo (3),
64.BR malloc (3),
65.BR malloc_info (3),
66.BR mallopt (3)