]> git.ipfire.org Git - thirdparty/man-pages.git/blame - man3/malloc_stats.3
fuse.4: ffix
[thirdparty/man-pages.git] / man3 / malloc_stats.3
CommitLineData
067568db
MK
1'\" t
2.\" Copyright (c) 2012 by Michael Kerrisk <mtk.manpages@gmail.com>
3.\"
93015253 4.\" %%%LICENSE_START(VERBATIM)
067568db
MK
5.\" Permission is granted to make and distribute verbatim copies of this
6.\" manual provided the copyright notice and this permission notice are
7.\" preserved on all copies.
8.\"
9.\" Permission is granted to copy and distribute modified versions of this
10.\" manual under the conditions for verbatim copying, provided that the
11.\" entire resulting derived work is distributed under the terms of a
12.\" permission notice identical to this one.
13.\"
14.\" Since the Linux kernel and libraries are constantly changing, this
15.\" manual page may be incorrect or out-of-date. The author(s) assume no
16.\" responsibility for errors or omissions, or for damages resulting from
17.\" the use of the information contained herein. The author(s) may not
18.\" have taken the same level of care in the production of this manual,
19.\" which is licensed free of charge, as they might when working
20.\" professionally.
21.\"
22.\" Formatted or processed versions of this manual, if unaccompanied by
23.\" the source, must acknowledge the copyright and authors of this work.
4b72fb64 24.\" %%%LICENSE_END
067568db 25.\"
4b8c67d9 26.TH MALLOC_STATS 3 2017-09-15 "Linux" "Linux Programmer's Manual"
067568db
MK
27.SH NAME
28malloc_stats \- print memory allocation statistics
29.SH SYNOPSIS
30.B #include <malloc.h>
dbfe9c70 31.PP
067568db
MK
32.B void malloc_stats(void);
33.SH DESCRIPTION
34The
35.BR malloc_stats ()
36function prints (on standard error) statistics about memory allocated by
37.BR malloc (3)
38and related functions.
39For each arena (allocation area), this function prints
1da7358e 40the total amount of memory allocated
067568db
MK
41and the total number of bytes consumed by in-use allocations.
42(These two values correspond to the
43.I arena
44and
45.I uordblks
46fields retrieved by
47.BR mallinfo (3).)
48In addition,
49the function prints the sum of these two statistics for all arenas,
50and the maximum number of blocks and bytes that were ever simultaneously
51allocated using
52.BR mmap (2).
53.\" .SH VERSIONS
54.\" Available already in glibc 2.0, possibly earlier
72dd4c2f
ZL
55.SH ATTRIBUTES
56For an explanation of the terms used in this section, see
57.BR attributes (7).
58.TS
59allbox;
60lb lb lb
61l l l.
62Interface Attribute Value
63T{
64.BR malloc_stats ()
65T} Thread safety MT-Safe
66.TE
847e0d88 67.sp 1
067568db
MK
68.SH CONFORMING TO
69This function is a GNU extension.
70.SH NOTES
71More detailed information about memory allocations in the main arena
72can be obtained using
73.BR mallinfo (3).
74.SH SEE ALSO
75.BR mmap (2),
76.BR mallinfo (3),
77.BR malloc (3),
78.BR malloc_info (3),
79.BR mallopt (3)