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